Manuscript Offprint
arXiv:2611.09117PathXAI: Evidence-guided structured pathology reporting by transferable tissue segmentation
Abstract
Pathology reporting requires translating tissue observations across regions and slides into specific diagnoses and supporting morphological descriptions. However, the use of explicit tissue-composition measurements to guide H&E-based report generation remains underexplored. Thus, we developed PathXAI, which combines segmentation-derived tissue information with H&E images and optional domain knowledge to guide diagnostic reasoning, targeted re-inspection and structured report writing. Its segmentation component exceeded baselines in mean Dice on internal and external tests. In automated report evaluation on 1,200 public and 151 private cases, PathXAI achieved higher agreement with reference diagnoses and documented morphology than the H&E-based comparators. On the public evaluation cohort, PathXAI-Report exceeded Qwen + H&E in cancer family match rate by 4.4 percentage points and in finding F1 by 5.7 percentage points. PathXAI generates evidence-linked reports with a self-hosted pretrained vision-language model, without updating its weights.
Keywords: computational pathology, transferable tissue segmentation, pathology report generation, spatial evidence, multimodal agents
Pathology reports translate histological observations into diagnostic information that supports clinical decision-making. Preparing a report requires pathologists to interpret tissue structure across regions and, often, multiple slides, and synthesize these findings into a diagnosis and its supporting descriptions [1].
Current methods that directly using haematoxylin and eosin (H&E) based pathological for report generation mainly integrating visual information across tissue areas. HistGen aggregates local and global image context, while HistoGPT generates skin-disease reports from multiple gigapixel whole-slide images (WSIs) and links generated text to image regions through saliency maps [1, 2]. Beyond image aggregation, multimodal pretraining connects tissue appearances with diagnostic language. mSTAR learns from WSIs, reports and gene expression and improves downstream report generation [3]. PRISM2 uses clinical-dialogue supervision for diagnostic interpretation and report completion [4]. Broader medical vision-language models (VLMs), such as MedGemma, support diverse medical imaging tasks, including pathology report generation from WSIs [5]. Beyond combining information across images, pathology reporting involves selecting and revisiting tissue regions to resolve diagnostic uncertainty. To achieve that, PathChat supports interpretation through questions about supplied pathology images [6] and PathAgent extends visual question answering to active inspection by selecting another region or adjusting magnification [7].
Despite these advances, none of these approaches incorporates explicit tissue compositions as guidance. In related pathology tasks, explicit modelling of cells, tissue regions and their spatial relationships improves breast-lesion classification [8]. Quantifying tissue components also provides prognostic information in colorectal cancer [9]. Together, these findings suggest possible advantages of incorporating explicit tissue information into pathology report generation.
In this paper, we investigate whether explicit tissue compositions can help guide the pathology reporting. Tissue segmentation offers a way to make tissue composition and spatial organization explicit for pathology reporting. In radiology, MAIRA-Seg provides a promising direction as it incorporates information from segmentation masks into a multimodal language model and improves chest X-ray report generation over non-segmentation baselines [10]. Existing pathology segmentation models, including PathSegmentor and VISTA-PATH, support diverse organ- and scale-specific targets [11, 12]. However, we need consistent measurements of tumour tissue and other relevant tissue components across regions and slides for tumour reporting. This motivates training a segmentation model to predict a small, shared set of tissue categories across organs.
To this end, we propose PathXAI, a system that integrates tissue evidence derived from segmentation provided by PathXAI-Seg into structured reporting across multiple slides through PathXAI-Report (Fig. 1(a)). PathXAI-Seg, the generalizable segmentation component trained on diverse public datasets, segments a shared set of tissue categories across datasets (Supplementary Table 1). It provides spatially aligned segmentation overlays and its derived tissue statistics for selected regions of interest (ROIs) (Fig. 1(b) and Supplementary Methods section 1.2). The reporting component, PathXAI-Report, uses a pretrained VLM to integrate tissue evidence with H&E images and the known anatomical site for diagnostic comparison and targeted reinspection (Fig. 1(b)). For obtaining more domain knowledge, PathXAI provide an customized option to retrieve disease definitions and morphological descriptions from KEEP [13] to provide domain context for comparing diagnostic hypotheses (Supplementary Methods section 2.4). The resulting reports combine disease classification, tumour subtype and grade, when assessable, with descriptions of structure, cytology, necrosis and invasion (Fig. 1(b)). Recorded evidence links associate report fields with image inputs, tissue checks and domain context for inspection (Fig. 1(a) and Supplementary Methods section 2.6).
PathXAI uses a pretrained VLM on a researcher-operated, self-hosted inference service, without updating the reporting model's weights. Study-specific training is confined to the segmentation component, trained on a single NVIDIA GeForce RTX 4090 GPU.
We evaluated PathXAI-Seg on five internal and six external segmentation test sets. PathXAI-Seg achieved higher mean Dice, than the baselines on both internal and external tests (Fig. 1(c)). We compared reports with references in 1,200 public evaluation cases spanning 22 cancer types and 151 shared private cases. Each private case had one reference report from each of two pathologists. Meanwhile, the same two pathologists assessed preference and correction requirements in 132 cases randomly sampled from the public development subset (Fig. 1(c)). Specifically, in paired development-subset comparisons, reports using tissue statistics already agreed more closely with reference diagnoses than those using H&E alone, suggesting the benefits of using tissue evidence. Moreover, in both cohorts, PathXAI-Report further improves the agreement with reference diagnoses and documented morphology.
Results
Reporting configurations and comparators
PathXAI-Report configurations. We present two different versions of PathXAI-Report. PathXAI-Report (core) uses segmentation evidence, appoaching diagnoses with adaptive reinspection. PathXAI-Report extends the core configuration with domain knowledge, more grade-focused reign of interests (ROIs) for grade judging and diagnostic constraints during the report writing. Both version built on Qwen3.6-27B. We did not update model weights using either reporting cohort. (Supplementary Methods section 2.2).
Comparators. To assess gains over direct H&E-based reporting, we compared PathXAI-Report with general-purpose Qwen3.6-27B [14], DeepSeek-V4.1-Flash [15] and GLM-5.3-Flash [16]. To benchmark against domain-specialized approaches, we included MedGemma-1.5-4B-it [5] and PRISM2 diagnostic outputs [4]. For the PLIP-guided Qwen reporting baseline, we used PLIP [17] to select tumour-related ROIs. We also compared the dedicated pathology report generators HistGen and HistoGPT [1, 2]¹, where the public cases from patients in their released training or validation splits were excluded for comparison. Configurations and comparison protocols are detailed in Supplementary Methods sections 3.1 and 3.2.
Automated report evaluation
Cohorts and reference reports. Primary automated evaluation used 1,200 public cases across 22 cancer types and 14 organ systems, separate from the 456 development cases. Public reference texts were obtained from OCR-processed reports released by WsiCaption [18] and preprocessed into a common format using Qwen3.6-27B (Fig. 2(a) and Supplementary Methods section 2.1). The primary private comparison included 151 breast, prostate and colorectal cases. Two pathologists independently wrote one reference report per case, forming reference sets P1 and P2. Pathologists could leave individual reference fields blank at their discretion. Generated reports were evaluated separately against each reference set, using only cases with assessable reference information for each metric (Fig. 2(c) and Supplementary Methods section 4.1).
¹HistoGPT was developed for dermatopathology. Its evaluation on non-skin cases therefore also assesses generalization to other organs.
(a) Inputs and capabilities

(b) Reporting with tissue evidence

(c) Evaluation questions and findings
How do reports perform?
Automated report evaluation and pathologist ranking and correction assessment
Public evaluation · n=1,200

Private refs · 151 shared cases

Ranking + correction · n=132
What improves reporting?
Change with tissue evidence
Diagnostic composite (cohort target)


Gain from report workflow
Cancer family match rate ↑

Case average · n = 456 · 95% CI

Does segmentation transfer?
Segmentation accuracy across data sources
Mean Dice gain ↑


Fig. 1 PathXAI integrates tissue segmentation with evidence-linked pathology reporting. (a) Inputs and capabilities. PathXAI-Report combines H&E slides, known anatomical site, tissue evidence and domain knowledge for structured reporting. (b) Reporting with tissue evidence. Segmentation maps, overlays and tissue statistics connect selected slide regions to diagnostic and morphological report fields. (c) Evaluation questions and findings. Automated report evaluation, pathologist assessment and segmentation comparisons are detailed in Figs. 2, 3 and 5. The public cancer-family benchmark uses the separate 1,200-case evaluation cohort; tissue-evidence and workflow contrasts use the 456-case public development subset. Report metrics weight applicable cases equally; P1/P2 denote the pathologists' reference sets. Gains are right minus left in percentage points (pp). Whiskers show unadjusted 95% bootstrap confidence intervals (CIs), resampling cases for reporting and source clusters for segmentation. (Notation: H&E, haematoxylin and eosin; ROI, region of interest; VLM, vision-language model; ↑, higher preferred. Pink robots denote PathXAI-Report; branching networks denote domain knowledge; the dashed return denotes additional ROIs or zooming. Report fields and links are schematic; tissue colours follow the shared key.)
Reference agreement and evaluation scope. Across the private cohort, the two pathologists' reports agreed on the specific diagnosis in 122 of 127 cases assessable against both pathologists, and on grade in 45 of 75 cases with a shared grading system (Fig. 2(d)). Separate scoring therefore retained differences between the two pathologists' interpretations. Each metric used the cases with applicable reference information.
Evaluation measures. We designed an evaluation framework comprising five complementary measures to assess diagnostic accuracy and the correctness and completeness of reported morphological findings. The same measures were applied to both cohorts (Figs. 2(b) and 2(e)). For diagnostic evaluation, we designed:
- Cancer family match rate assesses whether the generated diagnosis belongs to the target cancer family, using TCGA labels for public cases and definite cancer-family diagnoses from the pathologist references for private cases.
- Exact diagnosis match rate measures agreement with the specific reference diagnosis, including the disease entity or histological subtype, with synonymous terms treated as equivalent.
Meanwhile, for morphological evaluation:
- Finding F1 combines finding precision and recall to summarize the correctness and completeness of reported morphological findings.
- Finding recall measures the fraction of reference finding types correctly reproduced as present or absent.
- Finding contradiction rate measures the fraction of definite, comparable finding assertions that contradict the presence or absence recorded in the reference.
The three finding-based measures include only finding types explicitly documented as present or absent in the reference. Higher values indicate better performance for the first four measures; lower values are preferred for finding contradiction rate. Detailed scoring rules are provided in Methods and Supplementary Table 7.
Diagnostic evaluation.
PathXAI-Report achieves the highest cancer family match rate in both public and private cohorts. In the 1,200-case public evaluation cohort, PathXAI-Report achieved a cancer family match rate of 72.5%, with paired gains of 0.6 pp over DeepSeek + H&E and 4.4 pp over Qwen + H&E (Fig. 2(b)). It also exceeded PathXAI-Report (core) by 4.3 pp (Supplementary Table 11). In the private cohort, cancer family match rate reached 93.4% against P1 and 93.5% against P2, exceeding Qwen + H&E against both reference sets (Fig. 2(e)).
PathXAI-Report achieves the highest exact diagnosis match rate in both public and private cohorts. Across 604 applicable public cases, PathXAI-Report achieved 62.3% agreement, exceeding Qwen + H&E and DeepSeek + H&E (Fig. 2(b)). In the private cohort, agreement was 67.4% for P1 and 67.6% for P2. Averaging the two reference-specific scores within each of 126 jointly evaluable cases yielded a paired gain over DeepSeek + H&E of 9.5 pp (Fig. 2(e)). The higher agreement therefore extends beyond matching broad cancer families to naming more specific diagnoses in both cohorts.
General-purpose H&E models exceed selected specialized comparators in both cohorts. Qwen + H&E, DeepSeek + H&E and GLM + H&E achieved higher finding F1 scores than MedGemma and PLIP-guided Qwen on public cases and against both reference sets. For cancer family match rate, all three models exceeded PRISM2 on public cases, while Qwen + H&E and DeepSeek + H&E also exceeded PRISM2 against both reference sets (Figs. 2(b) and 2(e)).
Morphological evaluation.
PathXAI-Report better reproduces documented morphology in both public and private cohorts. On the public cohort, PathXAI-Report had the highest finding F1, 48.8%, across 997 applicable cases. Finding F1 exceeded Qwen + H&E by 5.7 pp and was also higher than PathXAI-Report (core) (Fig. 2(b) and Supplementary Table 11). Finding recall reached 41.6% versus 36.6% for Qwen + H&E on the same cases (Fig. 2(b) and Supplementary Table 9). Against both reference sets, PathXAI-Report likewise had the highest finding F1, at 76.6% for P1 and 78.9% for P2. Finding recall was also highest against both reference sets (Fig. 2(e)).
PathXAI-Report expands finding coverage in both cohorts, with lower contradiction publicly and higher contradiction privately than Qwen + H&E. Finding coverage measures the fraction of documented finding types receiving a definite, comparable assertion. On the public cohort, PathXAI-Report had higher finding coverage than Qwen + H&E and a finding contradiction rate that was 5.5 pp lower in the paired comparison (n=664 cases with assessable assertions in both methods; Fig. 2(b) and Supplementary Table 11). Against each reference set, finding coverage and finding contradiction rate were both higher than those of Qwen + H&E (Fig. 2(e)). PLIP-guided Qwen had the lowest finding contradiction rate among the public-cohort report-generating comparators, but also the lowest finding coverage and finding F1. Its lower contradiction therefore did not translate into more complete recovery of reference-documented findings (Fig. 2(b)). Complete coverage and contradiction estimates are in Supplementary Results sections 2.1 and 1.4.
PathXAI-Report also achieved higher cancer family match rates and finding F1 than HistGen and HistoGPT on shared public evaluation cases and in the private cohort (Supplementary Figs. 14 and 18).
Automated report evaluation · public cohort
(a) Public cohort and reference sources
| PUBLIC EVALUATION · n = 1,200 · 14 ORGAN SYSTEMS | Bar length: cases | ||
|---|---|---|---|
| Kidney | 326 | Endocrine | 35 |
| Gynaecologic | 135 | Haematologic | 17 |
| Breast | 132 | Hepatobiliary | 13 |
| Gastrointestinal | 132 | Eye | 6 |
| Head and neck | 132 | Male genitourinary | 3 |
| Urinary | 132 | Skin | 3 |
| Central nervous system | 131 | Thoracic | 3 |
| PUBLIC REFERENCE ROUTE | |
|---|---|
| Labels + clinical reports | |
| Field-specific references | |
| Automated report evaluation | |
| Development-set assessments shown separately in Fig. 3 | |
(b) Diagnostic outputs and morphology
| Public cases% · 95% CI | Cancer family match rate ↑n = 1,200 | Exact diagnosis match rate ↑n = 604 | Finding F1 ↑n = 997 | Finding recall ↑n = 997 | Finding contradiction rate ↓n varies |
|---|---|---|---|---|---|
| Qwen + H&E | 68.1 | 58.9 | 43.0 | 36.6 | 16.0 |
| DeepSeek + H&E | 71.9 | 60.3 | 42.1 | 36.1 | 23.2 |
| GLM + H&E | 61.8 | 56.0 | 44.2 | 38.1 | 22.5 |
| MedGemma | 6.7 | 6.1 | 37.4 | 31.8 | 14.4 |
| PLIP-guided Qwen | 45.7 | 39.2 | 21.9 | 17.8 | 6.3 |
| PRISM2 | 53.2 | 52.6 | NA | NA | NA |
| PathXAI-Report (core) | 68.2 | 58.1 | 46.7 | 39.4 | 9.8 |
| PathXAI-Report | 72.5 | 62.3 | 48.8 | 41.6 | 11.5 |
Automated report evaluation · private cohort against pathologist-written references
(c) Private cohort and pathologist references
| PRIVATE · 152 INCLUDED CASES | 7 site groups · 6 hospitals | ||
|---|---|---|---|
| Site | Abbr. | Official English name | n |
| Breast | TTSH | Tan Tock Seng Hospital | 76 |
| Prostate | ZSH | Zhongshan Hospital, Fudan University | 12 |
| Prostate | CHH | Changhai Hospital | 12 |
| Prostate | CZH | Shanghai Changzheng Hospital | 12 |
| Prostate | HBGH | Hebei General Hospital | 12 |
| Prostate | JPH | Jiangsu Province Hospital | 14 |
| Colorectal | CZH | Shanghai Changzheng Hospital | 14 |
| REFERENCE SETS | |
|---|---|
| 151 common cases | |
| Generated reportvs P1 vs P2 | |
| Separate estimatesPaired differences | |
| Reference disagreement | |
| Field | n | A | D | A / D |
|---|---|---|---|---|
| Broad diagnosis | 123 | 123 | 0 | |
| Specific diagnosis | 127 | 122 | 5 | |
| Malignancy | 145 | 143 | 2 | |
| Invasion | 140 | 139 | 1 | |
| Necrosis | 135 | 126 | 9 | |
| Grade* | 75 | 45 | 30 |
(d) Reference agreement
A: agree; D: disagree; n: comparable
*Same grading system
(e) Diagnostic outputs and morphology by reference
| 151 shared cases · %• P1 filled ○ P2 openValues: P1 / P2 | Cancer family match rate ↑n (P1/P2): 121/123 | Exact diagnosis match rate ↑n (P1/P2): 135/136 |
|---|---|---|
| Qwen + H&E | 89.3 / 89.4 | 54.1 / 54.4 |
| DeepSeek + H&E | 90.9 / 90.2 | 60.0 / 55.9 |
| GLM + H&E | 64.5 / 65.0 | 43.0 / 43.4 |
| MedGemma | 4.1 / 4.1 | 3.0 / 2.9 |
| PLIP-guided Qwen | 88.4 / 88.6 | 32.6 / 31.6 |
| PRISM2 | 64.5 / 63.4 | 54.8 / 52.2 |
| PathXAI-Report (core) | 93.4 / 93.5 | 57.8 / 55.9 |
| PathXAI-Report | 93.4 / 93.5 | 67.4 / 67.6 |
| Finding F1 ↑ | Finding recall ↑ | Finding contradiction rate ↓ | |||
|---|---|---|---|---|---|
| n (P1/P2): 150/151 | n (P1/P2): 150/151 | n (P1/P2): 150/151 | n varies | ||
| 71.6 / 73.3 | 68.0 / 70.0 | 14.5 / 10.6 | |||
| 66.4 / 69.1 | 61.7 / 64.7 | 19.7 / 17.4 | |||
| 63.1 / 64.7 | 56.7 / 58.8 | 10.9 / 9.1 | |||
| 38.4 / 42.8 | 35.7 / 40.4 | 41.6 / 35.1 | |||
| 31.1 / 33.1 | 23.3 / 26.2 | 23.1 / 20.2 | |||
| NA | NA | NA | |||
| 67.3 / 70.9 | 64.0 / 67.5 | 24.5 / 19.0 | |||
| 76.6 / 78.9 | 75.0 / 77.3 | 18.7 / 16.2 | |||
Fig. 2 Automated report evaluation on public and private cohorts. (a) Public cohort and references. The public evaluation cohort is separate from the development subset. (b) Public report evaluation. Diagnostic and morphological outcomes on the public evaluation cohort. (c) Private cohort and reference sets. Each case has a separately authored report from each pathologist. (d) Reference agreement. Fields must be assessable in both reports; grade also requires the same grading system. (e) Private report evaluation. Methods use shared cases and are evaluated separately against each reference set. Cancer family targets are TCGA labels publicly and definite cancer-family diagnoses privately; benign or unresolved private references are inapplicable. Applicable cases receive equal weight. Finding contradiction rate uses method-specific comparable assertions and is interpreted with finding coverage. OCR-based content analyses are exploratory. Full estimates are in Source Data. HistGen/HistoGPT comparisons appear in Supplementary Figs. 14 and 18. (Notation: P1/P2, pathologists' reference sets; H&E, haematoxylin and eosin; OCR, optical character recognition; NA, not applicable. Bars show point estimates; whiskers show pointwise 95% confidence intervals (Supplementary Methods section 3.10). Axis ranges vary.)
Pathologist ranking and correction assessment
Cases, readers and comparators. The two pathologists who authored the private reference reports ranked reports and rated correction requirements for 132 development cases sampled randomly within cancer type. We included Qwen + H&E as a general-purpose baseline, MedGemma as a medically pretrained comparator, and PLIP-guided Qwen to represent pathology-specific image-text guidance. Comparing PathXAI-Report (core) with PathXAI-Report assessed the added value of the complete reporting workflow. Each pathologist assessed all five methods, yielding 264 case-pathologist ratings per method. Assessment and re-review procedures are described in Supplementary Methods section 4.2.
Assessment measures. Overall preference ranks ranged from 1 (best) to 5, with ties allowed. The no/minor-correction proportion measures how often readers judged that a report required no or only minor edits. The no/minor correction with complete fields measure also required no output failure and explicit answers for every applicable diagnostic, grade, invasion and necrosis field. The field check measured answer presence, not correctness; appropriate abstentions also counted as incomplete. Lower mean ranks and higher no/minor-correction and complete-fields success proportions are preferred (Fig. 3(a)).
PathXAI-Report most often combines low correction requirements with complete answers to applicable fields among all five methods. PathXAI-Report met all three criteria in 61.7% of ratings (163/264), compared with 34.5% for Qwen + H&E and 37.5% for PathXAI-Report (core), and lower proportions for MedGemma and PLIP-guided Qwen (Fig. 3(a)). MedGemma had the highest no/minor-correction fraction alone (87.9%), but fewer of its reports also satisfied the output and field-coverage checks. Full results and field definitions are in Supplementary Results section 3.1, Supplementary Methods section 4.3, and Supplementary Table 28.
PathXAI-Report retains preference ranks similar to Qwen + H&E and PathXAI-Report (core), with more no/minor-correction ratings. PathXAI-Report received no/minor-correction ratings in 83.3% of assessments, exceeding PathXAI-Report (core), Qwen + H&E and PLIP-guided Qwen (Fig. 3(a)). The difference from Qwen + H&E arose in one reader's ratings (Supplementary Results section 3.1). Mean preference ranks were similar for PathXAI-Report, Qwen + H&E and PathXAI-Report (core), and better than those of MedGemma and PLIP-guided Qwen (Fig. 3(a)).
Tissue evidence and its use in reporting: Ablation studies
We compared direct tissue inputs with their use during diagnostic review and writing on 456 public development cases. The comparisons included H&E alone, H&E with tissue statistics, H&E with segmentation overlays, and PathXAI-Report (Supplementary Methods sections 3.3 and 3.4). Supplementary Table 6 summarizes the components changed in each comparison. We evaluated histological grading using balanced grade accuracy. We average the percentages of correctly graded cases within reference histological grades 1, 2 and 3, giving each grade equal weight. Missing or incompatible predictions count as incorrect; unassessable reference grades are excluded. Higher values indicate better agreement.
H&E with tissue statistics improves diagnostic agreement over H&E alone, whereas overlays show little diagnostic gain. H&E with tissue statistics increased exact diagnosis match rate by 4.5 pp (352 applicable cases). Cancer family match rate also increased. In contrast, H&E with segmentation overlays gave little change in exact diagnosis match rate and lower finding F1 (Fig. 3(b)).
PathXAI-Report improves morphological reporting beyond direct tissue statistics or overlays. Against direct tissue-statistics input, PathXAI-Report increased finding F1 by 7.7 pp, with the same exact diagnosis match rate point estimate (Fig. 3(b)). Finding contradiction rate was lower, although the difference remained uncertain. Against direct overlay input, PathXAI-Report increased finding recall. Finding contradiction rate was lower among cases with assessable assertions in both methods (Fig. 3(c) and Supplementary Tables 31.1 to 31.2). The additional workflow benefit therefore concerns documented morphology beyond the diagnostic gains from tissue statistics.
PathXAI-Report combines more cancer-type corrections with higher grade agreement. Relative to direct overlay input, 45 reports that were incompatible with the target cancer family became compatible under PathXAI-Report, with 19 changes in the reverse direction (Fig. 3(d)). Among 174 applicable cases with three-level grades, PathXAI-Report increased balanced grade accuracy by 25.0 pp over direct tissue-statistics input (Fig. 3(b)). Grade-specific predictions, including recovered unanswered fields and errors between grades, are shown in Supplementary Fig. 21.
Acquiring additional regions or combining knowledge, diagnostic safeguards and diagnosis-constrained writing yields higher grade agreement. Requesting additional regions when diagnostic candidates conflicted increased balanced grade accuracy by 8.3 pp over candidate selection alone (172 applicable cases from 432 paired cases). Combining knowledge-informed reasoning, diagnostic safeguards and diagnosis-constrained writing with grade-focused writer images increased balanced grade accuracy by 14.5 pp over the grade-image baseline (174 applicable cases; Fig. 3(e)). Finding F1 increased by 2.8 pp. This contrast evaluates these configuration changes together. Complete workflow estimates, including zoom-enabled reinspection and diagnostic-composite results, are in Supplementary Fig. 22 and Supplementary Table 33.
Public-cohort pathologist ranking and correction assessment
(a) Pathologist ranking and correction assessment
132 development cases
| Kidney | 15 |
|---|---|
| Gynaecologic | 20 |
| GI | 20 |
| Breast | 5 |
| Head/neck | 5 |
| Urinary | 5 |
| CNS | 4 |
| Endocrine | 10 |
| Thoracic | 18 |
| Hepatobiliary | 5 |
| Male GU | 10 |
| Haematologic | 5 |
| Eye | 5 |
| Skin | 5 |
| Mean rank / ratings (%), 95% CI | Overall preference Mean rank ↓ | No/minor correction Ratings (%) ↑ | No/minor correction with complete fields (%) ↑ |
|---|---|---|---|
| MedGemma | 2.76 | 87.9 | 31.1 |
| Qwen + H&E | 1.63 | 73.1 | 34.5 |
| PLIP-guided Qwen | 3.29 | 49.6 | 14.0 |
| PathXAI-Report (core) | 1.60 | 74.2 | 37.5 |
| PathXAI-Report | 1.64 | 83.3 | 61.7 |
Rank: 1 most preferred; 5 least preferred. Ties allowed.
Tissue evidence and its use in reporting
(b) Tissue-input and report-workflow comparisons
456 development cases
| Kidney | 51 |
|---|---|
| Gynaecologic | 68 |
| GI | 67 |
| Breast | 17 |
| Head/neck | 17 |
| Urinary | 17 |
| CNS | 17 |
| Endocrine | 34 |
| Thoracic | 66 |
| Hepatobiliary | 17 |
| Male GU | 34 |
| Haematologic | 17 |
| Eye | 17 |
| Skin | 17 |
| Paired difference (pp), 95% CI | Cancer family match rate ↑ | Exact diagnosis match rate ↑ | Finding F1 ↑ | Balanced grade accuracy ↑ |
|---|---|---|---|---|
| n = 456 | n = 352 | n = 408 | n = 174 | |
| H&E + tissue statistics vs H&E only | +4.17 | +4.55 | -2.80 | -0.38 |
| H&E + overlays vs H&E only | -0.44 | +0.57 | -3.41 | +3.53 |
| PathXAI-Report vs H&E + tissue statistics | +1.10 | +0.00 | +7.66 | +24.97 |
| PathXAI-Report vs H&E + overlays | +5.70 | +3.98 | +8.28 | +21.06 |
(c) Report content, finding coverage and contradictions
| Case average (%), 95% CI | Finding F1 ↑ n = 408 | Finding coverage ↑ n = 408 | Finding contradiction rate ↓ n |
|---|---|---|---|
| H&E only | 40.6 | 41.4 | 19.3 |
| H&E + tissue statistics | 37.8 | 37.6 | 18.0 |
| H&E + segmentation overlays | 37.2 | 38.7 | 20.7 |
| PathXAI-Report | 45.5 | 45.0 | 15.5 |
(d) Paired cancer family match transitions
| Input policy → PathXAI-Report | Both compatible | Improved | Worsened | Both incompatible |
|---|---|---|---|---|
| H&E only | 297 | 53 | 29 | 77 |
| H&E + tissue statistics | 311 | 39 | 34 | 72 |
| H&E + segmentation overlays | 305 | 45 | 19 | 87 |
0
456 cases
(e) Acquisition and writing policies: paired differences (pp)
| Region acquisition | Report writing | |
|---|---|---|
| Additional regions vs candidate selection | Knowledge-informed, diagnosis-constrained writing vs grade-focused images | |
| Balanced grade accuracy (n = 172) | Balanced grade accuracy (n = 174) | Finding F1 (n = 408) |
Fig. 3 Pathologist ranking and correction assessment; tissue evidence and its use in reporting. The 456-case public development subset supplies the policy comparisons; pathologist ratings cover 132 of these cases. (a) Pathologist assessment. Preference ranks allow ties. The complete-fields measure combines no/minor correction, no output failure and definite answers in every applicable field; field completeness measures answer presence. Re-review retained the original ratings. (b) Tissue-input and workflow comparisons. (c) Report content. Finding F1, coverage and contradiction rate are interpreted together. (d) Cancer family match transitions. Corrections and reversals relative to cohort targets. (e) Acquisition and writing. The writing contrast changes knowledge-informed reasoning and diagnosis constraints together. Additional policies are shown in Supplementary Fig. 22. Paired differences subtract the second-named policy from the first. Whiskers show unadjusted 95% case-bootstrap intervals, retaining both raters for (a) and stratifying grade by reference class. Grade classes receive equal weight; other outcomes weight cases equally. (Notation: n, metric-applicable cases; pp, percentage points. Faint bars start at 1 for ranks and at zero otherwise.)
Case examples and evidence links
PathXAI-Report improves grading over direct Qwen + H&E reporting in the breast example. PathXAI-Report uses the same pretrained Qwen backbone within a workflow that integrates tissue evidence, diagnostic review and constrained writing. In breast case C035, this workflow reported Grade 2, matching both pathologists, while Qwen + H&E reported Grade 3. PathXAI-Report also made invasive ductal carcinoma of no special type explicit in the diagnostic fields; Qwen + H&E named this subtype in its final summary (Fig. 4(a)).
Recorded evidence links distinguish tissue measurements, image interpretation and diagnostic context. In the adrenocortical-carcinoma case TCGA-OR-A5LL (Fig. 4(b)), PathXAI inspected three diagnostic regions from two slides and revisited them through two rounds of zooming. The resulting diagnosis matched the TCGA cohort target. Neoplastic-tissue measurements checked for tumour presence, while the known adrenal site and retrieved adrenocortical-carcinoma definition supplied diagnostic context (Figs. 4(c) and 4(d)). Architecture and cytology descriptions linked to H&E inputs, requiring image interpretation beyond tissue labels. Two additional H&E fields entered grade-focused writing without segmentation masks.
The evidence record makes conflicting regional checks and unassessable fields explicit. The report described extensive geographic necrosis with eosinophilic cellular debris and loss of nuclear detail, and its record linked this statement to positive dead-tissue checks in R1 and Z1 (Fig. 4(d)). Checks in R3, Z2 and Z3 were negative, and the overall tissue-based check for the statement was weak. These conflicting checks expose uncertainty behind the necrosis claim. The report marked invasion as unassessable; the automated verification likewise marked it as not assessable because the tumour edge and surrounding-tissue interface were not visible. The complete image sequence and a target-discordant case are analysed in Supplementary Figs. 23 and 24.
Transferable tissue segmentation for reporting
We evaluated segmentation of the tissue categories used in reporting across data sources, comparing tissue-mask overlap with same-backbone fine-tuning and pathology segmentation systems. Organ-level analyses examined performance variation, and training comparisons tested joint supervision against configurations with selected loss weights set to zero.
Datasets and evaluation design
PathXAI-Seg uses a shared seven-label space comprising background, neoplastic tissue, inflammatory tissue, connective tissue, epithelial tissue, dead or necrotic tissue, and gland structure. PathXAI-Seg was trained with 492 densely annotated images from five datasets and auxiliary images sampled from a pool of 344,604 images with image-level labels from eighteen datasets. Testing included 124 internal samples from five datasets and 11,089 external samples from six test sets, covering five organs (Fig. 5(a)). The external RINGS dataset provided tumour and gland segmentation tasks on the same 500 images, counted once per task in the external sample total. Internal tests used samples from training-source datasets; external tests used other sources. The densely annotated training datasets cover breast, colorectal and lung; external tests also include prostate and liver. Tissue-label harmonization and dataset-specific counting units are detailed in Supplementary Methods section 1.1 and Supplementary Fig. 1.
We evaluated PathXAI-Seg (MedSAM3) and PathXAI-Seg (SAM2), which use MedSAM3 and SAM2 as their respective segmentation backbones [19, 20]. PathXAI-Seg (MedSAM3) was used by PathXAI-Report. To assess gains over standard supervised adaptation, each was compared with fine-tuning of the same backbone on the pixel-labelled training data. Other comparators were zero-shot MedSAM3, HoVer-Net fine-tuning [21], nnU-Net [22] and a CONCH-based segmentation implementation, CONCHSeg [23]. A separate comparison used the pathology segmentation models PathSegmentor and VISTA-PATH on three shared external datasets [11, 12] (Supplementary Methods section 1.5).
Segmentation accuracy was assessed primarily using Dice, defined as twice the overlap between predicted and reference masks divided by their combined area. Dice ranges from 0 to 1, with higher values indicating better agreement. Internal and external mean Dice summaries give each test set equal weight. Intersection over union (IoU), defined as the overlap divided by the union of the masks, was a secondary metric reported in Source Data.
Segmentation transfer across data sources
PathXAI-Seg improves mean Dice over same-backbone fine-tuning. PathXAI-Seg (MedSAM3) exceeded standard same-backbone fine-tuning by 2.6 pp internally and 0.8 externally. PathXAI-Seg (SAM2) also improved internal Dice, whereas its external gain was 0.1 pp (Fig. 5(e)). Absolute scores across evaluation tasks are shown in Fig. 5(b) and Supplementary Table 41.1.
Both PathXAI-Seg variants exceed PathSegmentor and VISTA-PATH in mean Dice on shared external datasets. Across ACDC-LungHP, PAIP2019 and METU-CCTGS, paired gains in equal-dataset mean Dice over VISTA-PATH were 2.6 pp for PathXAI-Seg (SAM2) and 1.6 for PathXAI-Seg (MedSAM3); both also exceeded PathSegmentor (Fig. 5(c)). This comparison uses ground-truth class-presence conditioning and a shared foreground definition; its protocol and full estimates are in Supplementary Methods section 1.5 and Supplementary Table 41.2.
Gains over same-backbone MedSAM3 fine-tuning differ by organ. Internal lung Dice increased from 0.449 to 0.534, whereas performance on external PAIP2019 liver histology was similar (Fig. 5(d)). Matched BCSS breast, ACDC-LungHP lung and PAIP2019 liver fields show predicted tissue compartments alongside the original H&E and
(a) Breast case C035: grade agreement and subtype placement
| Pathologist references | Qwen + H&E | PathXAI-Report | |
|---|---|---|---|
| Grade | P1 / P2: Grade 2 | Grade 3 (Nottingham) | Grade 2 |
| Diagnosis / subtype fields | Invasive breast carcinoma, high grade |
Qwen + H&E also names ductal NST in its final summary.
(b) Target-concordant diagnosis: adrenocortical carcinoma
TCGA-OR-A5LL
TCGA target: adrenocortical carcinoma
CONCH image-text ranking → VLM initial ROI selection
Reinspection: original R1–R3 only
| Source WSI | H&E | Seg. | H&E | Seg. | Grade-only H&E |
|---|---|---|---|---|---|
| S1 | R1 · initial | Z1 · round 1 | G1 | ||
|  |  |  |  | ||
| S4 | R2 · initial | Z2 · round 1 | G2 | ||
|  |   |  |  | ||
| R3 · initial | Z3 · round 2 | ||||
| Neoplastic | Inflammatory | Connective | Epithelial | Dead / necrotic | Gland |
(c) Retrieved knowledge

Adrenocortical carcinoma
DOID:3948
Entity definition
Adrenal cortex cancer arising from epithelial cells.
Retrieved morphology · FNA
"atypical hyperchromatic nuclei"
"prominent nucleoli"
"granular necrotic debris"
Retrieved disease context.
Links in (d)
Recorded association
Context link or automated tissue check.
Image input
Supplied for diagnosis or report writing.
(d) Recorded evidence associations
| Generated report excerpts | Evidence, inputs and checks |
|---|---|
| G1 + G2: grade-focused H&E\nR1–R3, Z1–Z3: tissue check | |
| Invasion\nAssessment of capsular invasion, vascular invasion, and invasion into adjacent normal adrenal tissue is not assessable from H&E ROI evidence. | No visible capsule / adjacent-tissue interface for an invasion check. |
Fig. 4 Case examples illustrate diagnostic reporting and links to tissue evidence. (a) Private breast report example. Qwen + H&E also names ductal NST in its final summary; the full comparison appears in Supplementary Fig. 16(b). (b) Public adrenocortical-carcinoma example. Source WSIs locate the selected regions and central-crop 2× digital zooms. G1/G2 provide H&E evidence for writing only. (c) Retrieved knowledge. Paraphrased entity definition and verbatim FNA morphology fragments. (d) Report excerpts and evidence links. Excerpts are verbatim from the released Full example, with bold emphasis added. Solid links denote recorded context associations or tissue checks; dashed links denote image inputs without verified claim-specific ROI attribution. Microscopy checks assess tumour presence. The necrosis check is weak despite the automated “supported” status. Case details appear in Supplementary Figs. 23 and 24. (Notation: P1/P2, pathologists' reference sets; IDC, invasive ductal carcinoma; NST, no special type; WSI, whole-slide image; ROI, region of interest; Seg., segmentation overlay; FNA, fine-needle aspiration. Grey guides link slides to ROIs; pink boxes and dashed guides mark zooms. Ellipses mark omitted text. Scale bars, 100 μm; tissue colours follow the shared key.) ground truth (Fig. 5(a)); complete dataset results are in Supplementary Table 41.4. Selection procedures are specified in Supplementary Methods section 1.6.
Ablation of segmentation training objectives
To assess the value of combining training objectives, we performed loss ablations for PathXAI-Seg (MedSAM3). We compared the full joint objective with three configurations that set the weights to zero for the auxiliary-map losses in Label-guided localization, the scale/shape terms in Mask geometry, or spatial contrast in Feature separation (Fig. 6(b)).
The full joint objective achieves the highest observed external mean Dice among the tested configurations. The spatial-contrast ablation within Feature separation (L5) showed the largest observed decreases in mean Dice, at 0.9 pp internally and 0.5 pp externally. The Label-guided localization (L3) and Mask geometry (L2) ablations each had external mean Dice less than 0.1 pp below the full joint objective, with internal differences of -0.7 pp and +0.6 pp, respectively. See more details in (Fig. 5(f) and Supplementary Table 44). Training settings are detailed in Supplementary Methods section 1.3.
Discussion
PathXAI shows that organizing how a pretrained VLM acquires and uses tissue evidence can improve diagnostic specificity and morphological reporting without updating the reporting model's weights. General-purpose VLMs were competitive with selected pathology-specialized comparators, and PathXAI-Report achieved further gains through evidence selection, diagnostic review and structured writing. Higher agreement against both pathologists' reference sets in the private cohort extends these findings beyond TCGA-derived references (Fig. 2).
The tissue-input comparisons help explain where these gains arise. Adding tissue statistics to H&E improved exact diagnosis match rate, while the complete workflow increased finding F1 and balanced grade accuracy with little further gain in exact diagnosis match rate (Fig. 3(b)). The gain in exact diagnosis match rate concerns the direct-reporting input comparison; the complete workflow additionally changes image review and report writing. H&E interpretation remains essential for architecture and cytology. The comparisons therefore support using tissue measurements to guide diagnostic review and preserving the resulting decisions during writing (Fig. 3(e)).
Report usefulness depends on both coverage and correctness. PathXAI-Report more often combined no/minor correction with complete fields, a distinction that preference ranks or correction ratings alone did not capture (Fig. 3(a)). The completeness component checks answer presence, so appropriate abstentions count as incomplete. Broader finding coverage accompanied lower contradiction than Qwen + H&E in public cases but higher contradiction against both private reference sets. Grade gains also included recovered answers alongside errors between classes. These findings favour writing policies that seek evidence for required fields and preserve uncertainty when that evidence is insufficient.
Automated assessment also depends on the information documented in the reference reports. For morphology, an undocumented finding is not a confirmed negative. An always-present control scored highly on public finding F1, reflecting the predominance of positive reference findings and the exclusion of undocumented types from scoring (Supplementary Tables 19 and 21). Separate evaluation against the two pathologists' reference sets preserves differences in their interpretations and reporting choices. These considerations make reference agreement one component of report evaluation alongside completeness and reader assessment.
Evidence links complement these assessments by exposing the information associated with report fields. H&E images supply morphology, tissue measurements quantify composition, and retrieved disease descriptions provide interpretive context. Distinguishing these roles helps reviewers separate observations of the case from general disease knowledge. The necrosis example retains conflicting regional checks alongside the generated statement (Fig. 4(d)), illustrating how the record can identify claims needing reassessment. Whether each linked ROI supports its associated claim still requires independent evaluation.
A shared tissue vocabulary provides a consistent basis for these measurements. PathXAI-Seg combines dense masks and auxiliary image-level targets under common labels, allowing images without tissue-region masks to contribute to training. Its external gains varied by backbone and organ (Fig. 5), motivating further development of pathology segmentation foundation models. CONCH demonstrates transfer from image-text pretraining to recognition, retrieval and segmentation [23]; PathSegmentor and VISTA-PATH directly predict pathology masks using semantic and, where applicable, spatial prompts [11, 12]. Building on these approaches, future pretraining could jointly learn tissue identity, boundaries and spatial organization across organs, using shared labels to integrate heterogeneous annotations. Such models should be evaluated for both segmentation transfer and the effect of segmentation errors on downstream diagnostic and morphological statements.
Several evaluation conditions define the scope of these findings. The cases used for tissue-input and workflow comparisons also contributed to prompt development; the public evaluation cohort and private cohort did not. HistoGPT was evaluated beyond its skin-disease training domain. Segmentation scores included reference-present classes, and all models in the shared external comparison received class identities without spatial locations. External foreground evaluation covered tumour-region masks and gland structures across four organs, with a broader foreground definition for METU-CCTGS. Foundation-model pretraining overlap remains unknown. The reader study used two pathologists and cases from the development subset, with prior ratings visible during re-review. Further evaluation should therefore apply fixed policies to new cases and assess reports with additional readers in a fresh, blinded study.
(a) Training and test data with matched examples

Segmentation performance across test sources
(b) Internal and external Dice
| Method | Internal · 5 test sets\nMean Dice | External · 6 test sets\nMean Dice | Overall · 11 test sets\nMean Dice |
|---|---|---|---|
| HoVer-Net FT | 0.620 | 0.340 | |
| nnU-Net 2D | 0.644 | 0.392 | |
| CONCHSeg | 0.142 | 0.264 | |
| MedSAM3 zero-shot | 0.314 | 0.563 | |
| SAM2 FT | 0.634 | 0.716 | |
| MedSAM3 FT | 0.657 | 0.723 | |
| PathXAI-Seg (SAM2) | 0.650 | 0.718 | |
| PathXAI-Seg (MedSAM3) | 0.683 | 0.731 |
(c) Shared external comparison
| Dice (%) · separate axes\n95% CI; dashed: VISTA-PATH | ||||
|---|---|---|---|---|
| PathSegmentor | 82.44 | 70.14 | 21.79 | |
| VISTA-PATH | 84.45 | 71.61 | 69.41 | |
| PathXAI-Seg (SAM2) | 85.06 | 76.07 | 72.21 | |
| PathXAI-Seg (MedSAM3) | 84.73 | 75.67 | 69.79 |
| Dice vs VISTA-PATH (pp) | SAM2 +0.61 | SAM2 +4.46 | SAM2 +2.80 | SAM2 +2.62 |
|---|---|---|---|---|
| Point differences | MedSAM3 +0.29 | MedSAM3 +4.06 | MedSAM3 +0.38 | MedSAM3 +1.57 |
(d) PathXAI-Seg vs fine-tuning by organ
◇ □ Fine-tuning baseline ◆ ■ PathXAI-Seg (ours)
Values: FT / PathXAI-Seg
Internal test
| SAM2 backbone | MedSAM3 backbone | |
|---|---|---|
| Breast (2) | 0.608 / 0.644 | 0.704 / 0.721 |
| Colorectal (2) | 0.774 / 0.729 | 0.713 / 0.718 |
| Lung (1) | 0.406 / 0.505 | 0.449 / 0.534 |
| SAM2 backbone | MedSAM3 backbone | |
|---|---|---|
| Colorectal (1) | 0.719 / 0.722 | 0.675 / 0.698 |
| Lung (1) | 0.847 / 0.851 | 0.845 / 0.847 |
| Prostate (3) | 0.660 / 0.658 | 0.686 / 0.695 |
| Liver (1) | 0.752 / 0.761 | 0.759 / 0.757 |
(e) PathXAI-Seg Dice gains over fine-tuning (pp)
PathXAI-Seg (SAM2)
PathXAI-Seg (MedSAM3)

(f) PathXAI-Seg objective ablations
MedSAM3: ablation – joint supervision
Dice (pp)

Fig. 5 Segmentation transfer across data sources and training-objective comparisons. (a) Data and matched examples. Sample units follow each dataset; AGGC uses specimens. RINGS tumour and gland segmentation reuse the same images, counted for each task. (b) Internal and external Dice. Tasks receive equal weight. (c) Shared external comparison. Target classes follow reference annotations; VISTA-PATH receives full-field boxes (Supplementary Methods section 1.5). (d) Dice by organ. PathXAI-Seg and standard fine-tuning are compared within each backbone. (e) Gains over matched fine-tuning. Paired differences are PathXAI-Seg minus same-backbone fine-tuning, using equal task or organ weights. (f) PathXAI-Seg objective ablations. For MedSAM3, selected weights in each labelled objective group are set to zero; differences are ablation minus joint supervision. Configurations and checkpoint selection are described in Supplementary Methods section 1.3. Whiskers show unadjusted 95% source-cluster bootstrap intervals within each task, reflecting test-source sampling. Dataset and result details are in Supplementary Fig. 1 and Supplementary Table 44 and Supplementary Tables 41.1 to 41.4. (Notation: n, dataset-specific samples; FT, fine-tuning; pp, percentage points. Blue/yellow denotes internal/external tests; parentheses in (d) give task counts. Dashed lines in (c) denote VISTA-PATH. Axis ranges vary; tissue colours follow the shared key.)
The evaluated workflow used self-hosted Qwen inference without study-specific VLM fine-tuning. Prospective studies in hospital workflows should test whether the gains in diagnostic agreement and documented morphology translate into shorter correction times and fewer residual errors while preserving diagnostic safety. PathXAI thus offers a route to improving reporting with existing models by making tissue evidence useful during generation and available for subsequent review.
Methods
Study design, ethics and data governance
The Results section on Automated report evaluation describes the reporting cohorts and references; Datasets and evaluation design describes the segmentation data. Reporting used cases as its analysis unit; segmentation used images, source clusters or specimens according to available identifiers (Supplementary Methods section 1.1). Reporting cohort sizes and the pathologist-assessment sample size were determined by case availability and pathologist review capacity, without a prospective sample-size calculation.
For public reporting, TCGA slides were linked by case to OCR-processed pathology-report text released by Wsi-Caption [18]. We restructured these texts into a common format using Qwen3.6-27B. Reference processing is specified in Supplementary Methods section 2.1; data preparation and reference-field availability are shown in Supplementary Fig. 4.
Private cases were randomly sampled within disease categories from six hospitals (Supplementary Table 3). Data from China were processed on servers in China, and data from Singapore on servers in Singapore. Private reference reports and ratings remain restricted; the private dataset will not be publicly released. Figures contain no private-case images. Ethics approval for the prostate and colorectal studies was obtained at Shanghai Changzheng Hospital (approval nos. 2024SL136 and CHEC2024-421, respectively), and for the breast study at Tan Tock Seng Hospital (DSRB 2025-1447). Approval 2024SL136 covered prostate data from all five contributing hospitals. Informed consent was waived for all three studies.
Item-level reporting checklists with manuscript locations accompany the submission.
PathXAI-Report
PathXAI-Report combines H&E images and anatomical site information with tissue evidence from PathXAI-Seg to guide diagnostic comparison, reinspection and structured report generation (Fig. 6). The segmentation model provides tissue label maps, aligned overlays and tissue-class fractions for selected regions; its architecture, training and inference are described in PathXAI-Seg.
Reporting configurations and inference
Inference used the fixed Qwen3.6-27B-Q6_K.gguf model on a researcher-operated, self-hosted service. Core and complete configurations used the same settings across public and private cohorts, with temperature 0.2 and a maximum of 4,096 generated tokens per call, including report writing. Thinking mode was disabled for all evaluated VLMs. Images were resized to a maximum edge of 768 pixels and transmitted as JPEGs at quality 75.
Both configurations construct an evidence graph, perform automated claim checks and write the report. The diagnostic, acquisition and writing stages below specify their shared procedures and the additional safeguards in the complete configuration. Selected ROIs may differ between configurations, so the complete-versus-core comparison includes changes to both evidence inputs and workflow. Candidate selection between V and T, knowledge retrieval and the acquisition rules run directly in code, requiring no additional model calls.
Prompt development and debugging used only the 456-case public development subset included in the reporting-policy comparisons (Supplementary Methods section 3.4). Primary report evaluation used the separate 1,200-case public evaluation cohort and the 151 shared private cases; combined public results are in Supplementary Results section 1. Stage inputs, message assembly, prompt templates and output formats are provided in Supplementary Methods section 2.2; the machine-readable templates accompany the supplementary material.
ROI ranking and initial selection
The inputs are H&E slides for each case and supplied site descriptions (Figs. 1(b) and 6(d)). CONCH [23] encodes tissue tiles and diagnostic text prompts to prioritize candidate regions before segmentation. The configured tile size is 1,024 pixels at 0.5 µm per pixel. For each tile, let and denote cosine similarities to the positive and negative prompts, respectively. Its ranking score is
The positive and negative query topics are listed in Supplementary Methods section 2.3. Candidates from the input slides are pooled by score, retaining up to 20 per case. Ranked tiles identify the centres of larger diagnostic ROIs, extracted at slide level 0 with a default side length of 4,096 pixels.
PathXAI-Sea: architecture and training
(a) Segmentation and tissue evidence
L1–L5: objective groups

(b) Training objectives

PathXAI-Report: overview and key mechanisms
(c) Report generation overview

(d) Evidence acquisition and diagnostic candidates

(e) Diagnosis selection and revisiting
(f) Constrained writing and structured report
Fig. 6 PathXAI architecture and report generation with tissue evidence. (a) Tissue segmentation. SAM2 and MedSAM3 implementations; examples use MedSAM3. (b) Training objectives. L3 uses image labels; L5 spatial contrast uses masks or image-label-constrained pseudo-labels. (c)–(f) Reporting workflow, diagnostic candidates, reinspection and constrained writing. V denotes the candidate augmented with KEEP in the complete configuration; T denotes the candidate without KEEP. Both use the same H&E-E-overlay images, site and VLM. Core omits KEEP. S records the tissue-statistics assessment by the check VLM, using images, site and tissue statistics for broad-lineage and subtype-sufficiency checks. V, T and S enter diagnosis selection in (e), where S supplies the subtype constraint; the final diagnosis constrains report writing in (f). PathXAI-Report extends invasion safeguards and adds writer-only grade ROIs and diagnosis locking. Grade-focused ROIs are selected from the remaining ranked candidates. The lock preserves the final diagnostic fields during writing and revision. Reinspection updates V/T candidates and the S assessment. Automated claim checks precede drafting and revision. Configuration details are in Supplementary Methods section 2.2; architecture and workflow details are in Supplementary Figs. 2, 3 and 5. (Notation: VLM, vision-language model; ROI, region of interest; L, loss. White denotes background; tensors, features and report fields are schematic. Light purple marks core operations; locks mark diagnosis-constrained writing. Arrows show data flow; fine L5 arrows, attraction/repulsion; headless dashes, objective inputs; dashed arrows, revisiting. Robots denote VLM roles.)
The VLM reviews images of the leading eight candidates and selects up to three initial diagnostic ROIs. Selection follows the returned candidate indices; if none is valid, the highest-ranked candidates provide the fallback. The selected H&E regions then receive PathXAI-Seg (MedSAM3) predictions.
Diagnostic candidates and selection
Diagnostic reasoning first assesses broad lineage and subtype sufficiency using ROI images, anatomical context and regional tissue fractions. The subtype assessment subsequently constrains the selected candidate, and both preliminary records enter the evidence graph. Two subsequent calls generate diagnostic candidates V and T from the selected H&E-segmentation composite images and anatomical context. V and T identify candidate records, with V receiving KEEP context in the complete configuration and T receiving none. Core omits KEEP. Neither candidate prompt includes numeric tissue summaries or the preliminary assessment text. The VLM assesses architecture and cytology from the images, which contain information beyond the seven segmentation classes. In the complete configuration, the V path also receives disease definitions and child-subtype candidates retrieved from the KEEP disease graph and pathology semantic groups [13]. The initial query uses specimen site; subsequent queries use the preliminary subtype or primary diagnosis and up to three differential diagnoses. Context is refreshed when reinspection changes the hypothesis. Retrieved material provides disease context; matching and ranking rules are given in Supplementary Methods section 2.4.
The selector compares candidate validity and diagnostic specificity. A candidate is valid if its diagnostic text is non-empty and contains no explicit non-diagnostic failure marker. For valid candidates, specificity is 3 for a non-generic subtype; otherwise 2 for a non-generic primary diagnosis not ending in “not otherwise specified” (NOS); otherwise 1 for a broad type other than generic neoplasm; otherwise 0. Invalid candidates receive -1.
If only one candidate is valid, it is selected; if neither is valid, V is returned as a fallback. When both are valid, the core selector retains V for a non-generic tumour-family disagreement, an invasive/in-situ conflict, or when T is less specific than an already specific V (V specificity score at least 2 and T lower); otherwise T is selected, including at equal specificity. The complete configuration adds invasion-state safeguards. It retains V when V indicates invasion and T indicates in-situ disease, ambiguous in-situ disease or unassessable invasion. It also retains V when V indicates in-situ or ambiguous in-situ disease and T indicates invasion. Other cases use the core selection rules.
Reinspection and acquisition limits
The sufficiency prompt asks whether tumour tissue and the required architecture, cytology, invasion and necrosis are visible. The model returns sufficiency (yes, partially or no), self-reported diagnostic confidence (high, medium or low), separate lists of missing image and non-image evidence, suggested additional ROIs, and a Boolean reportability decision. The reinspection logic in Supplementary Fig. 5(b) uses this Boolean decision to trigger further acquisition. While the decision remains false, the system acquires more evidence until it reaches a round or ROI limit, has no unused acquisition action, or obtains the same diagnosis signature in two successive updates. The signature comprises broad type, primary diagnosis, subtype and malignancy after case and punctuation normalization. Reinspection allowed up to two ROIs per round, four rounds, one zoom level and eleven final ROIs per case. Acquisition can stop with evidence gaps unresolved; a final diagnostic pass then produces the final diagnosis used for report writing.
The missing-evidence categories determine the next acquisition action. Eligible current ROIs are preferred for zoom when image gaps mention cytology, nuclear detail or mitotic features; other image gaps trigger additional regions, and non-image-only gaps do not trigger image acquisition. A failed or exhausted zoom falls back to new regions. A zoom uses the aligned parent mask crop when available and is re-segmented otherwise; a new ROI receives a new PathXAI-Seg prediction. Digital zoom enlarges a crop within the parent ROI without increasing optical sampling. New ROIs are chosen from the unselected candidates. The first addition has the highest remaining score; subsequent additions maximize minimum coordinate distance from the regions selected in that acquisition step. Additional acquisition details are given in Supplementary Methods section 2.5.
Diagnosis-constrained report generation
In the complete configuration, report generation follows the final diagnostic pass. A diagnosis lock preserves diagnostic identity, subtype and invasion from the final diagnosis (Fig. 6(f)), with anatomical site retained as input context. To supplement the writing evidence, a grade-focused selector excludes the diagnostic ROIs and ranks the remaining candidates using existing scores and grade-related metadata. Its default budget is two additional H&E ROIs, configurable up to four; the illustrated complete run used two. These images receive no additional segmentation and enter writing only, supporting grade, necrosis and cytological description without revising site, primary diagnosis, subtype or invasion. If the final diagnosis already specifies a grade, that grade is also retained; the auxiliary images can inform its accompanying description. Ranking and duplicate-exclusion rules are specified in Supplementary Methods section 2.6.
Before drafting, both configurations associate claims extracted from the diagnostic fields with image inputs, tissue statistics and contextual nodes in an evidence graph. Automated assessments of these claims guide subsequent report revision. Heuristic checks assign an initial support status; a valid VLM assessment for the same claim replaces that overall status while preserving the tissue-rule subcheck. Missing or failed VLM assessments retain the heuristic result. Known-site statements stay supported, and explicit "not assessable" statements cannot be relabelled weak, unsupported or contradicted. These automated checks have not been independently validated by pathologists.
The writer first produces a structured draft with sections for specimen/site, diagnosis, lesion description, microscopic findings, invasion/necrosis/margins, ancillary studies, stage/grade/prognostic features and a summary. Drafts missing required headings or minimum content are retried once, followed by a diagnosis-preserving fallback if needed. Revision then uses the claim assessments to state supported claims affirmatively, qualify weak claims, remove unsupported or contradicted claims and explicitly mark unassessable fields. An invalid revision leaves the draft unchanged. In the complete configuration, a final consistency step preserves the locked diagnostic fields after revision. The resulting report is displayed alongside slides, ROI/zoom relationships, overlays and tissue statistics in the viewer, which also shows acquisition steps, image inputs and automated checks associated with each report field (Supplementary Figs. 8 to 11 and Supplementary Methods section 5).
Evaluation and statistical analysis of reporting
Pathologist reference-report authoring
Weixiang Zhong and Xiaoxi Wang are attending pathologists at The First Affiliated Hospital, Zhejiang University School of Medicine, Hangzhou, China; both hold doctoral degrees. They had 16 years of experience in gastrointestinal and breast pathology and 12 years in central nervous system pathology, respectively. Each authored private reference reports and independently assessed public reports in the ranking and correction assessment described below.
The two pathologists' reports form separate reference sets, P1 and P2. For every private case, each pathologist authored a reference report from slides and anatomical site information, which was provided at the pathologists' request. They did not have access to the original clinical reports or diagnoses. The Chinese reference reports were translated into English using Qwen and checked against the originals by both pathologists. The English references were finalized before automatic scoring and were not subsequently revised in response to model outputs or scores. The WSI/ROI workspace provided structured fields and narrative sections (Supplementary Fig. 6 and Supplementary Methods section 4.1).
For agreement between the pathologists' reports for each case (Fig. 2(d)), we compared broad diagnosis, specific diagnosis, malignancy, invasion, necrosis and grade using the terminology and polarity rules in Report text extraction. Each field included only cases with definite values in both pathologists' reports; grade additionally required the same grading system. We counted matching and differing values separately and divided each count by the number of comparable cases to obtain the displayed proportions. Chance-adjusted agreement is reported in Supplementary Table 23.
Automated report evaluation
Text similarity alone does not distinguish a correct diagnosis from a similarly worded report with a clinically important error [1]. In chest X-ray reporting, entity-and-relation measures and clinical-error measures aligned more closely with radiologist assessments than text-overlap scores [24, 25]. We therefore designed a pathology-specific evaluation framework that separately assesses diagnostic identity, morphological agreement and completeness, and opposing assertions. Shared terminology, synonym and polarity rules allow these comparisons across differently worded reports, while reference-based applicability avoids treating undocumented findings as negative observations.
Report text extraction
All methods used the same terminology and extraction rules for final reports. Scoring used final text, reference fields and anatomical context, without internal reasoning, segmentation predictions or method identity.
The study lexicon contains 84 entities and 236 canonical or synonymous expressions. Recognized diagnostic names, abbreviations and synonyms map to canonical entities; synonym equivalence, parent-child relations and TCGA-family membership are separate mappings.
Diagnostic extraction prioritized recognized diagnosis sections. If none was present, it used final-summary and unsectioned text. Explicit subtype fields in other eligible sections contributed only their stated subtype. Recognized history, differential-diagnosis, recommendation and ancillary-study sections were excluded. Final diagnostic addenda were included; gross-description and frozen-section text did not supply the final diagnosis. A longer child entity could refine a nested parent label; unrelated affirmed entities remained conflicting. Negated, uncertain and alternative diagnoses did not receive credit for an exact diagnosis match. Anatomical context could resolve an unqualified entity but could not supply an unreported histological subtype.
Finding extraction uses 20 concepts covering invasion and its specific routes, necrosis, metastasis, cytological features, tissue architecture, stromal changes, inflammatory infiltrate and calcification. Case-insensitive, finding-specific patterns normalize lexical variants and assign present, absent, uncertain or conflicting states. Polarity is assigned to individual findings within clauses, including shared negative predicates in coordinated lists. Requests to assess a finding are not observations. Only explicitly documented positive or negative reference findings are assessable; reference silence is not a negative finding. Structured pathologist reference fields retain the recorded judgement. The full concept list and scope-specific extraction rules are given in Supplementary Methods section 3.8.
A sensitivity analysis also included final-summary diagnoses when a diagnosis section was present. The extraction rules have not been independently validated across methods and report formats. Detailed text normalization, polarity rules, reference-target handling and the sensitivity analysis are specified in Supplementary Methods section 3.6; the machine-readable terminology and matching rules are supplied in evaluation_rules.json. Public content analyses based on OCR-derived references were exploratory.
Primary evaluation measures
All primary measures are reported as percentages, averaging equally over applicable cases. Supplementary Table 7 summarizes the primary and additional measures.
Cancer family match rate. This is the fraction of applicable cases in which the generated diagnosis belongs to the target cancer family. Public targets come from TCGA disease-family labels. Private targets are derived separately from each pathologist's definite cancer diagnosis using the same family-membership rules; benign or unresolved private references are inapplicable. A diagnosis can match the cancer family without identifying the exact histological subtype. Let be the cases with an applicable cancer-family target and indicate whether the generated diagnosis matches that family. The reported percentage is . An applicable case with a missing, uncertain, conflicting or incompatible prediction contributes zero. Cases with inapplicable references are excluded from .
Exact diagnosis match rate. This is the percentage of cases with a definite, specific reference diagnosis in which the generated diagnosis maps to the same canonical disease entity or subtype. For example, “conventional renal cell carcinoma” and “clear cell renal cell carcinoma” map to the same entity, whereas generic “renal cell carcinoma” does not identify this specific subtype. Public targets come from the case reports, and private targets come from each pathologist's report separately. We divide the number of matching diagnoses by the number of cases with an applicable reference and multiply by 100. Missing, uncertain, conflicting or incompatible predictions contribute zero; cases without an applicable reference diagnosis are excluded.
Finding F1. This score balances how often definite finding statements agree with the reference (precision) and how many reference findings are correctly reproduced (recall), using their harmonic mean. The same finding-specific rules map recognized lexical variants, such as “mitoses” and “mitotic figures”, to one concept in generated and reference narratives. Scoring includes only finding types explicitly documented as present or absent in the reference, such as invasion, necrosis or glandular architecture. Both agreeing that a finding is present and agreeing that it is absent count as matches. For each case, the score is twice the number of matching finding types divided by the sum of the documented reference types and the types addressed by a definite generated assertion. Missing, uncertain or conflicting statements provide no match or definite assertion. A case with documented reference findings but no definite generated assertions scores zero; a case with no documented reference findings is excluded. We average the applicable case scores and multiply by 100. For example, two matches among three assertions against four documented reference findings give a case score of 4/7.
Finding recall. This measures the completeness of reference-matching morphology. For each case, it is the number of documented reference finding types correctly reproduced as present or absent, divided by the total number of documented reference finding types. It is the recall component of finding F1. Missing, uncertain, conflicting or opposite statements receive no credit; findings not documented in the reference do not enter the denominator. A case with no documented reference findings is excluded. The reported percentage is 100 times the mean of the applicable case-level fractions, with equal weight for each applicable case.
Finding contradiction rate. This measures how often a definite generated statement opposes the reference among finding types addressed by both reports. For each case, we divide the number of opposite present/absent statements by the number of reference-documented finding types assigned a definite present/absent assertion in the generated report. Missing, uncertain or conflicting assertions do not enter this denominator, and cases with no comparable definite assertions are excluded. The reported percentage is 100 times the mean of the applicable case-level fractions. Because omitting findings can reduce opportunities for contradiction, we interpret this measure alongside finding recall and finding coverage.
Finding coverage. This additional measure describes how much of the documented morphology a report addresses, whether correctly or incorrectly. For each case, we divide the number of reference-documented finding types addressed by a definite generated present/absent assertion by the total number of documented reference finding types. Missing, uncertain or conflicting statements do not count as definite assertions. Cases with documented findings but no definite assertions score zero; cases with no documented reference findings are excluded. The reported percentage is 100 times the mean of the applicable case-level fractions.
For the four morphology measures, let be the number of finding types documented as present or absent in case 's reference, the number of these types addressed by a definite generated assertion, the number with matching polarity and the number with opposite polarity, so that . The case-level formulas, with the applicability rules above, are
Additional grade and coverage measures
Balanced grade accuracy. This is the mean of the correct-prediction fractions within each represented reference-grade class, giving each grade equal weight. Thus, a common grade does not dominate the score simply because it occurs more often. An explicit overall grade takes precedence over incidental adjectives; isolated nuclear morphology does not establish overall grade. Grading systems are evaluated separately. Missing or incompatible predictions are incorrect when the reference grade is assessable, and unassessable references are excluded. For the set of represented reference grades and cases with reference grade , balanced grade accuracy is
We multiply this score by 100 for percentage reporting. Confusion counts and an always-highest-grade control complement this measure (Supplementary Methods section 3.7).
Report field completeness. Report field completeness measured whether a report gave definite answers for each applicable field among broad diagnosis, specific diagnosis, malignancy, grade, invasion and necrosis. A reference field was applicable only when definite and non-null; the specific diagnosis field additionally required a specific disease entity or histological subtype. Missing, uncertain or conflicting generated fields were uncovered. Answers did not have to be correct or use a compatible grading system to count towards coverage. This measure follows the rationale for explicit elements in synoptic reporting [26] and differs from finding recall, which requires agreement with documented morphology. For applicable fields , this coverage is . A case with no applicable fields is excluded. We average the applicable case scores and multiply by 100.
Definitions of the additional diagnostic, grade, critical-finding and wording-overlap measures reported in the supplementary analyses are provided in Supplementary Methods sections 3.6 to 3.9.
Report uncertainty and paired comparisons
Case-level scores were averaged equally across applicable cases, without cancer-type weighting. Balanced grade accuracy instead weighted the represented reference grades equally. Pointwise 95% confidence intervals used exact binomial limits for binary proportions and conservative simultaneous binomial limits for balanced and ordinal grade scores and joint-reference binary means (Supplementary Methods section 3.10). Other case-average measures and paired differences used 4,000 case-bootstrap draws (seed 20260831), with resampling within reference-grade classes for paired balanced grade accuracy. Bootstrap limits were the 2.5th and 97.5th percentiles. These intervals were not adjusted across comparisons. An additional sensitivity analysis applied Holm adjustment to the 126 paired comparisons of PathXAI-Report with the displayed automated-report comparators (Supplementary Results section 6); test definitions are in Supplementary Methods section 3.10. Cancer-type- and organ-stratified intervals are reported in Supplementary Results section 8.
Primary comparisons used cases with reports available from every included method or configuration; supplementary private estimates also used all available reports. A sensitivity analysis retained all eligible cases and assigned zero to unavailable reports for diagnostic match rates, finding F1 and finding recall (Supplementary Results section 7). Paired contrasts used within-case score differences on cases applicable to both methods, averaged equally across cases for ordinary measures and first within reference-grade classes then equally across classes for balanced grade accuracy. Each private reference set determined which cases were eligible for scoring. Paired comparisons of finding contradiction rate required at least one comparable assertion from each method in each retained case; the methods need not assert the same findings. For joint-reference comparisons, we averaged the two reference-specific scores within each case where both fields were applicable before resampling cases. Patient-level linkage was unavailable in the private cohort, so these intervals assumed independence between cases.
A sensitivity analysis excluded identifiable TCGA cases shared with segmentation training pools (Supplementary Results section 1.3).
Case-eligibility rules, bootstrap settings and reference-grade limitations are in Supplementary Methods section 3.10.
Pathologist ranking and correction assessment
Presentation and re-review
The two pathologists initially assessed reports from MedGemma, Qwen + H&E, PLIP-guided Qwen and PathXAI-Report (core) in a four-report comparison. PathXAI-Report was then assessed alongside these reports on a 1–5 rank scale, with the existing scores available for revision. All five reports underwent re-review under anonymous method labels, with a separate key linking labels to methods. Report presentation order was randomized using a key specific to each case, pathologist and round, and remained fixed within each assignment. Prior overall ranks and correction ratings remained visible after reordering. Both pathologists retained those values unchanged. Each rating was counted once, and ratings were analysed separately without consensus adjudication. Readers had no access to reference reports or TCGA diagnoses during either assessment round.
Ratings and statistical analysis
Overall ranks ranged from 1 (best) to 5 and allowed ties. Correction categories were none, minor, major or unusable. Checkbox concerns recorded unsupported major claims and visible omissions as reader selections, not adjudicated events. Section-specific rankings were excluded from the primary analysis because prior section scores could be reused. Rare concern flags were reported descriptively. Interface controls and concern-flag interpretation are described in Supplementary Fig. 7 and Supplementary Methods section 4.2. Ranks, correction categories and reader concern flags were analysed separately. For cases and readers, the mean rank for method is , where is the assigned rank and 1 denotes the most preferred report. Each correction-category proportion is the number of ratings in that category divided by . The no/minor-correction proportion combines the first two categories. Concern-flag proportions use the same denominator. Percentages multiply these proportions by 100. Case-cluster resampling of pathologist ratings retained both observed readers and all methods together; these intervals describe uncertainty for the evaluated cases and fixed readers. The bootstrap draw count and interval construction follow the automatic-report analysis described above.
Report-content checks
The no/minor correction with complete fields criterion was defined before pathologist assessment. We applied two content checks to reports rated as requiring no or only minor correction. The first flagged empty reports, empty recognized Diagnosis/Primary Diagnosis sections, or explicit full-field unavailable results such as “not specified” or “No diagnosis generated”, using identical rules across methods. Generic diagnoses remained nonempty; unrecognized headings required format review. The second required a definite answer for each applicable field among broad diagnosis, specific diagnosis, malignancy, grade, invasion and necrosis. A field was applicable when it could be assessed in the reference report; missing, uncertain or conflicting answers failed this check. A major/unusable rating, output failure or failure of any applicable field check counted as joint failure, with overlaps counted once. All 264 ratings per method remained in the denominator. These automated checks left the pathologists’ ratings unchanged. For the no/minor correction with complete fields measure, each case-reader pair contributes one only if all three requirements hold, and zero otherwise; the mean of these indicators is reported as a percentage. Joint failure is its complement. The field checks assessed whether the fields had definite answers, not whether those answers were correct (Supplementary Methods section 4.3 and Supplementary Table 28).
PathXAI-Seg
Tissue labels and image preparation
Dataset-specific annotations are aligned to the shared seven-label space introduced in Results, using the conversion rules in Supplementary Methods section 1.1 and Supplementary Table 1. Pixel masks define tissue location, while auxiliary image-level targets extend supervision to images without tissue-region masks. Auxiliary targets derive from nuclear annotations, marker masks and image classes, including dataset-specific proxies for tissue identity. Public training sources used fixed per-dataset 80:20 sample partitions (seed 42); held-out pixel-labelled samples formed the internal test set. These are sample partitions and do not establish patient-level separation.
Unannotated pixels are distinguished from known background. Zero-valued pixels in partially annotated BCSS images are excluded from the supervised Dice and binary cross-entropy (BCE) losses and from the known-background penalty. Images are magnification-aligned to a 40-times-equivalent scale, sampled into a -pixel field and resized to pixels for SAM2 or pixels for MedSAM3.
Backbone architectures
We implemented the shared tissue representation with SAM2 and MedSAM3 using visual low-rank adaptation [19, 20, 27].
PathXAI-Seg (SAM2) retains the pretrained Hiera-Large visual encoder [28] and original neck, inserts vision low-rank adapters, and adds a custom top-down feature pyramid network (FPN) [29] that maps multiscale features to tissue logits (Supplementary Fig. 3(a)). The original encoder and neck weights remain fixed. The semantic FPN and vision adapters are trainable throughout training. The visual adapters have rank 8 and scaling parameter 16. This implementation does not use a language encoder or text-initialized class embeddings. Each neck feature map is projected to 256 channels by a convolution. Starting at the coarsest level, features are bilinearly upsampled, added to the next lateral projection and processed by a convolution, 16-group normalization and GELU. A final convolution produces seven tissue logits. Auxiliary tasks use the original neck feature maps.
PathXAI-Seg (MedSAM3) uses the SAM3 image architecture [30] and prompt-conditioned decoding (Supplementary Fig. 2(c)). Vision adapters have rank 8, scaling parameter 16 and dropout 0.05. Original visual weights, the language encoder, multimodal transformer and mask decoder remain fixed. Tissue text prompts initialize class embeddings, which are updated during supervised adaptation and fixed in the two continuation stages. Auxiliary tasks use the last visual-trunk feature map before its neck and decoder. MedSAM3’s spatial projection maps 1,024 channels through 256 channels to 128-dimensional features. Its tissue-classifier weights supply detached global prototypes, which are distinct from the text-initialized class embeddings.
Training loss definitions
Training proceeds through supervised adaptation, joint supervision and focal refinement. Supervised adaptation learns tissue regions from pixel masks using a Dice-based objective [31] and binary cross-entropy. Joint supervision interleaves pixel-labelled and image-labelled samples through five functional groups. Mask matching fits annotated tissue probabilities; Mask geometry constrains area, boundaries and smoothness; Label-guided localization uses image-level presence information on spatial probability maps; Tissue recognition predicts tissue presence from pooled features; and Feature separation pulls same-tissue features together while separating different tissues. Each sample contributes only the objectives supported by its annotation type. Focal refinement retains these groups and reweights the pixel cross-entropy term toward difficult predictions [32].
The five objective groups in Fig. 6(b) combine the terms defined below. For a tissue class , denotes its predicted probability at pixel , its reference mask and the indicator that the pixel has an assessable annotation. The set contains supervised pixels, and contains known-background pixels. Unannotated BCSS pixels are excluded from and . Pixel-mask losses are averaged over classes present in the reference.
L1, Mask matching. We use a masked Dice objective [31] with a linear denominator and unit smoothing, together with binary cross-entropy (BCE),
Probabilities entering logarithms are clamped to . Focal refinement replaces BCE with focal BCE [32],
Where enabled and is nonempty, the known-background penalty is . MedSAM3 also uses a probability-margin term , where and are mean probabilities over target pixels and labelled non-target pixels, respectively. This term is omitted if either set is empty.
L2, Mask geometry. Let and be the mean predicted probability and mean binary target over the complete image grid, each clamped below at . Scale regularization is
using smooth L1 loss [33]. Define as the difference between max-pool dilation and erosion, with stride 1 and padding 2, clipped to . Shape regularization combines boundary overlap with anisotropic total variation [34],
The two means cover horizontally and vertically adjacent pixels. Both geometry terms are zero when the target contains fewer than four pixels. These terms are computed over the full image grid.
L3, Label-guided localization. For an auxiliary probability map with pixels, including padded locations, let contain the largest probabilities for non-background tissue class , and let indicate whether its image-level target is positive. Within a multiple-instance supervision framework [35], we use
Here is the number of non-background tissue classes and is clamped to for BCE. The absent-class term is zero if no class is labelled absent. Entropy minimization [36] acts on the probability maps. These terms use binary presence derived from the supplied tissue targets.
L4, Tissue recognition. Pooled image features feed a tissue classifier with sigmoid outputs and supplied targets . For the set of known targets, its loss is
An empty known-target set contributes zero. MedSAM3 additionally predicts organ identity with softmax probabilities and cross-entropy for the target organ . Known-label masks, pseudo-target rules and backbone-specific gradient routes are specified in Supplementary Methods section 1.3.
L5, Feature separation. Spatial contrast samples up to 128 target-class feature locations and 128 other labelled locations per tissue class, requiring at least four of each before sampling. Let and be these sets, their cosine similarities and a location's confidence weight. The spatial loss is
Spatial contrast losses are summed over tissue classes meeting the sampling requirements above, whereas mask matching and geometry losses are averaged over reference-present classes. Reference-labelled locations have unit weight. Auxiliary images use image-label-constrained pseudo-labels. Tissue probabilities are clamped to , converted to logits and normalized across classes by softmax. Each pixel receives the highest-probability class; when positive image labels exist, assignments to absent classes are excluded. Confidence is , where is the softmax entropy. Values at or below 0.2 receive zero weight. Label maps use nearest-neighbour resizing and confidence maps use bilinear resizing. Confidence weights retain their probability-map gradients.
For MedSAM3 auxiliary images, a global feature-prototype term uses the mean-over-positives log-softmax form of supervised contrastive learning [37],
Here is the pooled image feature, is the detached tissue-classifier prototype and contains classes with positive image-level targets. The term is omitted when is empty; its gradient updates the image feature, not the prototype weights. Each training sample contributes the weighted sum of its applicable terms, with gradient routes and coefficients specified in Supplementary Methods section 1.3.
Optimization, sampling and checkpoint selection
Supervised adaptation, joint supervision and focal refinement use backbone-specific optimization schedules, with the selected checkpoint from each phase initializing the next. Both backbones use AdamW [38].
MedSAM3. MedSAM3 starts from its pretrained initialization and uses 5,000, 2,500 and 2,500 configured iterations for supervised adaptation, joint supervision and focal refinement, respectively. Joint supervision and focal refinement balance pixel-labelled sampling across tissue classes and datasets and interleave auxiliary images every sixth loader position.
SAM2. SAM2 starts from a supervised fine-tuning run configured for 10,000 microsteps. The three subsequent phases use 5,000, 2,500 and 2,500 microsteps, respectively, with auxiliary images scheduled every sixth sampling step.
For both backbones, we retained the checkpoint with the best training-set performance. The 124 internal test samples and external datasets were used only for evaluation. Training comparisons examine selected checkpoints, objective configurations and refinement branches with differing optimization budgets. Learning rates, gradient accumulation, sampling weights, crop and augmentation settings, and run-specific comparisons are given in Supplementary Methods section 1.3 and Supplementary Table 2.
Tissue-evidence outputs
For SAM2, each foreground tissue logit gives , for . The background score is ; the background-channel logit is not used to construct this score. MedSAM3 combines class-conditioned query scores and mask probabilities. Larger fields use windowed inference with overlap-aware aggregation. After spatial resizing and aggregation, classwise argmax produces the predicted tissue label map. The same coordinate system is retained for aligned segmentation overlays and tissue statistics (Supplementary Fig. 2(e)). Tissue-class fractions use all pixels in the ROI mask as their denominator, while foreground fraction is reported separately. These fractions describe predicted area under the dataset-specific label mappings. The output labels are mutually exclusive at each pixel, although gland structures can contain neoplastic or non-neoplastic epithelium (Supplementary Table 1). Auxiliary recognition and feature-separation heads are used during training. PathXAI-Report receives the tissue label maps, overlays and tissue fractions.
Evaluation and statistical analysis of segmentation
Comparator implementations
The nnU-Net model uses the v2 2D RGB configuration. HoVer-Net uses the official PanNuke-pretrained fast encoder.
CONCHSeg is a study-specific CONCH-based tile classifier. The evaluated configuration freezes CONCH and learns a neighbour aggregator, class-specific affine transformations of text embeddings and a logit scale. It broadcasts each tile's class logits across its pixels, without a pixel decoder or cell adapter. This comparator therefore evaluates tile-level classification transferred to the pixel grid. Training budgets and checkpoint selection for these comparators are given in Supplementary Methods section 1.4.
Segmentation measures and aggregation
Dice was the primary segmentation measure; intersection over union (IoU) was retained as a secondary measure [39, 40]. Only tissue classes present in the reference contributed; known background was included according to each task's annotation protocol.
For a reference-present class, true-positive (TP) pixels belong to that class in both masks, false-positive (FP) pixels occur only in the prediction, and false-negative (FN) pixels occur only in the reference. We calculated
Absent reference classes do not contribute correct empty-mask scores. For BCSS, class 0 is excluded from the scored class set, but zero-labelled pixels remain non-target pixels when scoring foreground classes and can contribute false positives. Other tasks retain background where specified by their annotation protocols.
Each task mean averaged image-class scores, or specimen-class scores for AGGC. The internal, external and overall summaries in Fig. 5(b) gave equal weight to five, six and eleven tasks, respectively. RINGS tumour and gland segmentation each contributed one task mean. Organ scores first averaged task means within each organ (Fig. 5(d)); equal-organ summaries then gave each organ equal weight. Paired gains in Fig. 5(e) show both task- and organ-weighted summaries. The objective comparisons in Fig. 5(f) used equal-task means. Dice differences were expressed in pp, so a difference of 0.01 corresponds to 1 pp. The shared external comparison used the same overlap definition but averaged its three datasets equally (Fig. 5(c)).
Specifically, for task , let contain the assessable sample-class pairs and denote each pair's Dice score. Task and equal-task summaries are
For organs, with task set for organ , the equal-organ summary is . Paired gains apply these same weights to , giving differences in pp.
Statistical analysis
All eight methods used pointwise 95% percentile source-cluster bootstrap intervals with 10,000 shared draws within each task (seed 20260922). Each sampled source retained all its class scores. The same draws were used across methods for absolute estimates and paired differences, including equal-organ gains. Case/source pairing and a sensitivity analysis for the shared RINGS images are described in Supplementary Methods section 1.4. These intervals describe test-sample uncertainty, not variation across independently trained models.
Checkpoint selection using training-set performance is described in Optimization, sampling and checkpoint selection; run-specific details are in Supplementary Methods section 1.3.
Shared external comparison
The shared external datasets were selected using the evaluated methods' published training datasets. All methods received the class IDs for tissues present in the annotations, without their locations. VISTA used full-field boxes and aligned mask assembly. The released systems were evaluated without matching their training budgets (Supplementary Methods section 1.5). Qualitative-example selection procedures are specified in Supplementary Methods section 1.6.
AI assistance
OpenAI Codex assisted with manuscript polishing, refinement of selected plotting scripts and review of the research code. Reference-text consistency checks used GPT-6.1 through OpenAI Codex.
Data availability
Report datasets. Public TCGA slides are available from the National Cancer Institute Genomic Data Commons (https://portal.gdc.cancer.gov/). Public reference reports used WsiCaption's OCR-extracted TCGA report texts
(https://github.com/cpystan/Wsi-Caption) [18], restructured as described in Supplementary Methods section 2.1. The manuscript includes selected de-identified report excerpts; private clinical images, complete reports and case-level data will not be publicly released.
Segmentation datasets. The sources used for pixel-labelled training, auxiliary training and external evaluation are listed below. Original access and usage terms apply. We thank the PathSegmentor authors for compiling and organizing public pathology datasets in PathSeg [11]. Access links for shared datasets follow their paper and acquisition guide (https://github.com/ghi-xuan-chen/PathSegmentor); links for additional datasets identify their original providers or the distribution used.
Pixel-labelled sources. BCSS (https://github.com/PathologyDataScience/BCSS) [41], DigestPath2019 (https://digestpath2019.grand-challenge.org/) [42], GlaS (https://datasetninja.com/gland-segmentation) [43], BACH whole slides (ICIAR2018) (https://zenodo.org/records/3632035) [44], and WSSS4LUAD (https://wsss4luad.grand-challenge.org/) [45].
Auxiliary sources. CPM15 (https://drive.google.com/drive/folders/11ko-GcDsPpA9GBHuCtl_jNzWQl6qY_-I), CPM17 (https://drive.google.com/drive/folders/1sJ4nmkif6j4s2FOGJ8j6i_Ye7z9w0TfA), NCT-CRC-HE-100K (CRC100K) (https://zenodo.org/records/1214456) [9], CoNIC2022 (https://conic-challenge.grand-challenge.org/) [46], BACH microscopy images (ICIAR2018) (https://zenodo.org/records/3632035) [44], Janowczyk (https://andrewjanowczyk.com/use-case-1-nuclei-segmentation/), Kumar (https://drive.google.com/drive/folders/1bI3RyshWej9c4YoRW-_q7lh7FOFDFUrJ), Lizard (https://www.kaggle.com/datasets/aadimator/lizard-dataset) [47], LC25000 (LungColon) (https://github.com/tampapath/lung_colon_image_set), MHIST (https://bmirds.github.io/MHIST/), MoNuSAC (https://monusac-2020.grand-challenge.org/Data/), NuCLS (https://sites.google.com/view/nucls/home) [48], Osteosarcoma (https://www.cancerimagingarchive.net/collection/osteosarcoma-tumor-assessment/), PanNuke (https://warwick.ac.uk/fac/cross_fac/tia/data/pannuke/), PatchCamelyon17 (PathMMU images.zip: https://huggingface.co/datasets/jamessyx/PathMMU), SegPath (https://dakomura.github.io/SegPath/) [49], SkinCancer (https://doi.org/10.11588/data/7QCR8S) and TNBC (https://peterjacknaylor.github.io/data/).
External sources. ACDC-LungHP (https://acdc-lunghp.grand-challenge.org/DATA/) [50], AGGC2022 (https://aggc22.grand-challenge.org/AGGC22/) [51], METU-CCTGS (https://eakbas.github.io/metu-cctgs/) [52], PAIP2019 (https://paip2019.grand-challenge.org/) [53], and RINGS (https://data.mendeley.com/datasets/h8bdwrtnr5/1) (tumour and gland tasks). Links identify providers or author distributions; their access and usage terms apply.
Domain-knowledge data. KEEP is available from its provider (https://huggingface.co/datasets/Loie/KEEP_dataset) after accepting its access conditions.
Aggregate numerical results underlying the figures and tables, public report-evaluation case lists, method availability by analysis and segmentation sample lists are provided in the accompanying Source Data.
Code availability
Inference code, including a Jupyter notebook, agent prompts and an evidence-linked HTML report viewer, and two pathologist tools (reference-report authoring, and report ranking and correction assessment) are available at https://github.com/zhaorui-tan/PathXAI. The repository also provides the report-scoring code and final public case lists. Adapter weights for PathXAI-Seg (MedSAM3) are available at https://huggingface.co/RayTan/PathXAI-Seg, subject to access approval. SAM3 base weights and CONCH weights are obtained separately from their providers.
Acknowledgements
For report evaluation, we acknowledge the TCGA Research Network for the public slides and pathology reports and the contributing hospitals for the private cohort.
For tissue segmentation, we thank the investigators and dataset providers who made the pixel-labelled, auxiliary-training and external-evaluation datasets available (Data availability).
Funding
This work was supported by the Industrial Alignment Funding Pre-Positioning Programme (IAF-PP Grant H25J6a0011), awarded to Weimiao Yu and his iDMP lab. The funder had no role in study design, data collection and analysis, manuscript preparation or the decision to submit for publication.
Author contributions
Zhaorui Tan conceived and developed the method, designed the experiments, collected the data, implemented the software, conducted the experiments, analysed the results and wrote the manuscript. Jun Aun Tan assisted with VLM deployment and inference integration and proofread the manuscript. Tan Pan contributed to discussions of the study concept. Xingdong Xue developed the data backend and report-evaluation platform. Weixiang Zhong and Xiaoxi Wang authored the reference pathology reports for the private cohort and evaluated reports produced by the compared systems. Weimiao Yu, Li Liu, Jing Zhang (Changzheng Hospital) and Jing Zhang (The First Affiliated Hospital, Zhejiang University School of Medicine) supervised the study.
Competing interests
The authors declare no competing interests.
References
[1] Tran, M. et al. Generating dermatopathology reports from gigapixel whole slide images with histogpt. Nature Communications 16 (2025).
[2] Guo, Z.-R. et al. Histgen: Histopathology report generation via local-global feature encoding and cross-modal context interaction 189–199 (2024).
[3] Xu, Y.-X. et al. A multimodal knowledge-enhanced whole-slide pathology foundation model. Nature Communications 16 (2024).
[4] Vorontsov, E. et al. End-to-end multimodal pathology foundation model with clinical dialogue. Nature Medicine 32, 3203 – 3213 (2026).
[5] Sellergren, A. B. et al. Medgemma 1.5 technical report. ArXiv abs/2604.05081 (2026).
[6] Lu, M. Y. et al. A multimodal generative ai copilot for human pathology. Nature 634, 466 – 473 (2024).
[7] Chen, J.-Y. et al. Pathagent: Toward interpretable analysis of whole-slide pathology images via large language model-based agentic reasoning. ArXiv abs/2511.17052 (2025).
[8] Pati, P. et al. Hierarchical graph representations in digital pathology. Medical image analysis 75, 102264 (2021).
[9] Kather, J. N. et al. Predicting survival from colorectal cancer histology slides using deep learning: A retrospective multicenter study. PLoS Medicine 16 (2019).
[10] Sharma, H. et al. Maira-seg: Enhancing radiology report generation with segmentation-aware multimodal large language models. ArXiv abs/2411.11362 (2024).
[11] Chen, Z. et al. Segment anything in pathology images with natural language. Nature Computational Science 6, 1024 – 1038 (2026).
[12] Liang, P. et al. Vista-path: An interactive foundation model for pathology image segmentation and quantitative analysis in computational pathology. ArXiv abs/2601.16451 (2026).
[13] Zhou, X. et al. Knowledge-enhanced pretraining for vision-language pathology foundation model on cancer diagnosis. Cancer cell (2024).
[14] Qwen Team. Qwen3.6-27B model card (2026). URL https://huggingface.co/Qwen/Qwen3.6-27B. Model card; accessed 8 October 2026.
[15] DeepSeek. DeepSeek-V4.1-Flash: Smarter, faster, more efficient (2026). URL https://api-docs.deepseek.com/news/news260910/. Official model release; accessed 27 October 2026.
[16] Z.ai. GLM-5.3-Flash model card (2026). URL https://huggingface.co/zai-org/GLM-5.3-Flash. Model card; accessed 6 November 2026.
[17] Huang, Z., Bianchi, F., Yuksekgonul, M., Montine, T. & Zou, J. Y. A visual-language foundation model for pathology image analysis using medical twitter. Nature Medicine 29, 2307–2316 (2023).
[18] Chen, P.-Y. et al. Wscaption: Multiple instance generation of pathology reports for gigapixel whole-slide images 546–556 (2023).
[19] Liu, A.-L. et al. Medsam3: Delving into segment anything with medical concepts. ArXiv abs/2511.19046 (2025).
[20] Ravi, N. et al. Sam 2: Segment anything in images and videos. ArXiv abs/2408.00714 (2024).
[21] Graham, S. et al. Hover-net: Simultaneous segmentation and classification of nuclei in multi-tissue histology images. Medical image analysis 58, 101563 (2018).
[22] Isensee, F., Jaeger, P., Kohl, S., Petersen, J. & Maier-Hein, K. H. nnu-net: a self-configuring method for deep learning-based biomedical image segmentation. Nature Methods 18, 203 – 211 (2020).
[23] Lu, M. Y. et al. A visual-language foundation model for computational pathology. Nature medicine 30, 863 – 874 (2024).
[24] Yu, F.-Y. et al. Evaluating progress in automatic chest x-ray radiology report generation. Patterns 4 (2022).
[25] Ostmeier, S. et al. Green: Generative radiology report evaluation and error notation. ArXiv abs/2405.03595 (2024).
[26] Schaad, N., Berezowska, S., Perren, A. & Hewer, E. Impact of template-based synoptic reporting on completeness of surgical pathology reports. Virchows Archiv 484, 31 – 36 (2023).
[27] Hu, J. et al. Lora: Low-rank adaptation of large language models. ArXiv abs/2106.09685 (2021).
[28] Ryali, C. K. et al. Hiera: A hierarchical vision transformer without the bells-and-whistles. ArXiv abs/2306.00989 (2023).
[29] Lin, T.-Y. et al. Feature pyramid networks for object detection. 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR) 936–944 (2016).
[30] Carion, N. et al. Sam 3: Segment anything with concepts. ArXiv abs/2511.16719 (2025).
[31] Milletari, F., Navab, N. & Ahmadi, S.-A. V-net: Fully convolutional neural networks for volumetric medical image segmentation. 2016 Fourth International Conference on 3D Vision (3DV) 565–571 (2016).
[32] Lin, T.-Y., Goyal, P., Girshick, R. B., He, K. & Dollár, P. Focal loss for dense object detection. 2017 IEEE International Conference on Computer Vision (ICCV) 2999–3007 (2017).
[33] Girshick, R. B. Fast r-cnn (2015).
[34] Beck, A. & Teboulle, M. Fast gradient-based algorithms for constrained total variation image denoising and deblurring problems. IEEE Transactions on Image Processing 18, 2419–2434 (2009).
[35] Pinheiro, P. H. O. & Collobert, R. From image-level to pixel-level labeling with convolutional networks. 2015 IEEE Conference on Computer Vision and Pattern Recognition (CVPR) 1713–1721 (2014).
[36] Grandvalet, Y. & Bengio, Y. Semi-supervised learning by entropy minimization. Advances in Neural Information Processing Systems, Vol. 17, 529–536 (2004). URL https://papers.nips.cc/paper/2004/hash/96f2b50b5d3613adf9c27049b2a888c7-Abstract.html.
[37] Khosla, P. et al. Supervised contrastive learning. ArXiv abs/2004.11362 (2020).
[38] Loshchilov, I. & Hutter, F. Fixing weight decay regularization in adam. ArXiv abs/1711.05101 (2017).
[39] Maier-Hein, L. et al. Metrics reloaded: Recommendations for image analysis validation. Nature methods 21, 195 – 212 (2022).
[40] Taha, A. & Hanbury, A. Metrics for evaluating 3d medical image segmentation: analysis, selection, and tool. BMC Medical Imaging 15 (2015).
[41] Amgad, M. et al. Structured crowdsourcing enables convolutional segmentation of histology images. Bioinformatics 35, 3461 – 3467 (2019).
[42] Da, Q. et al. Digestpath: A benchmark dataset with challenge review for the pathological detection and segmentation of digestive-system. Medical image analysis 80, 102485 (2022).
[43] Sirinukunwattana, K. et al. Gland segmentation in colon histology images: The glas challenge contest. Medical Image Analysis 35, 489–502 (2016).
[44] Aresta, G. et al. Bach: Grand challenge on breast cancer histology images. Medical image analysis 56, 122–139 (2018).
[45] Han, C. et al. Wsss4luad: Grand challenge on weakly-supervised tissue semantic segmentation for lung adenocarcinoma. ArXiv abs/2204.06455 (2022).
[46] Graham, S. et al. Conic challenge: Pushing the frontiers of nuclear detection, segmentation, classification and counting. Medical image analysis 92, 103047 (2023).
[47] Graham, S. et al. Lizard: A large-scale dataset for colonic nuclear instance segmentation and classification. 2021 IEEE/CVF International Conference on Computer Vision Workshops (ICCVW) 684–693 (2021).
[48] Amgad, M. et al. Nucls: A scalable crowdsourcing approach and dataset for nucleus classification and segmentation in breast cancer. GigaScience 11 (2021).
[49] Komura, D. et al. Restaining-based annotation for cancer histology segmentation to overcome annotation-related limitations among pathologists. Patterns 4 (2023).
[50] Li, Z. et al. Deep learning methods for lung cancer segmentation in whole-slide histopathology images—the acdc@lunghp challenge 2019. IEEE Journal of Biomedical and Health Informatics 25, 429–440 (2020).
[51] Huo, X. et al. A comprehensive ai model development framework for consistent gleason grading. Communications Medicine 4 (2024).
[52] Arslan, D. et al. Colorectal cancer tumor grade segmentation: A new dataset and baseline results. Heliyon 11 (2025).
[53] Kim, Y. et al. Paip 2019: Liver cancer segmentation challenge. Medical image analysis 67, 101854 (2020).
[54] Lin, C.-Y. Rouge: A package for automatic evaluation of summaries. Annual Meeting of the Association for Computational Linguistics, 74–81 (2004).
Supplementary Information
This supplement describes tissue segmentation, multi-slide reporting and their evaluation.
Contents
| Supplementary Methods | Page |
|---|---|
| 1. Segmentation data, models, training and validation | 25 |
| 2. Cohorts and multi-slide report generation | 32 |
| 3. Report comparisons, scoring and statistical analysis | 45 |
| 4. Pathologist reference-report authoring and ranking and correction assessment | 53 |
| 5. Evidence-linked report viewer | 55 |
| Supplementary Results | |
| 1. Automated report evaluation on the public cohort | 60 |
| 2. Automated report evaluation on the private cohort | 80 |
| 3. Pathologist ranking and correction assessment and report-content checks | 94 |
| 4. Tissue evidence and its use in reporting | 96 |
| 5. Sensitivity to diagnostic extraction scope | 103 |
| 9. Evidence-linked public cases and failure analysis | 111 |
| 10. Segmentation transfer and training-objective comparisons | 113 |
| Reading guide | |
| Colour and symbol conventions | 117 |
| Terminology and operational definitions | 48 |
Supplementary Methods
The five sections cover segmentation, report generation, automated evaluation, pathologist ranking and correction assessment and the evidence-linked viewer. Data preparation and implementation details precede the associated validation procedures.
1. Segmentation data, models, training and validation
Performance and training comparisons appear in Supplementary Results section 10.
1.1. Datasets, label harmonization and inputs
The per-dataset partition rule is specified in Methods, Tissue labels and image preparation. External datasets provided independent evaluation for both backbones and were not used for training or checkpoint selection. The training and test data are summarized in Fig. 5(a), with counts for each dataset in Supplementary Fig. 1. Counts use the dataset-specific units of images, tiles, slides or specimens. The six external test sets include RINGS tumour and RINGS gland, which use the same 500 images. Each RINGS test set contributes 500 to the external total of 11,089 samples, and AGGC counts specimens. Some eligible training samples may not be drawn within the fixed number of training steps. The accompanying Source Data list sample IDs, their datasets and training/test assignments. Among samples with recoverable TCGA patient identifiers, training pools and the internal test set shared four patients, although their sample identifiers did not overlap.
In the organ-composition matrix (Supplementary Fig. 1(b)), circle area represents each organ's share of samples; mixed-organ and unclassified samples remain separate. The tissue-label matrix (Supplementary Fig. 1(c)) covers dense training masks and internal and external test annotations. For each tissue label, prevalence is the mean proportion of samples containing that label across these datasets with suitable annotations. Measured zeros are included; datasets without suitable annotations are excluded. Labels can co-occur, so these summaries describe neither tissue area nor disease prevalence.
Dataset-specific annotations are mapped to the shared seven-label vocabulary (Supplementary Figs. 2(a) and 2(b)). RINGS images are paired by filename with the supplied manual tumour and gland masks; nonzero mask pixels map to neoplastic and gland foreground, respectively. Input magnification, crop dimensions, backbone-specific resizing and the handling of unannotated pixels are specified in Methods, Tissue labels and image preparation.
Public dataset links are listed in Data availability. Annotation conversion and eligibility. Supplementary Table 1 specifies the dataset-specific conversions and the classes supervised by the tissue-classification loss. The seven labels form an operational annotation vocabulary. Gland denotes a structure, while neoplastic and epithelial describe tissue identity; these biological concepts can overlap. Source annotations determine the supervised label, so a gland mask contributes gland supervision without establishing whether its epithelium is neoplastic. The final argmax map assigns one label per pixel, and its class fractions describe the predicted partition under these conversion rules. Only the five pixel-labelled sources supply tissue-region masks. Nuclei annotations and SegPath marker masks supply auxiliary image-level targets, not tissue-region segmentation targets. Typed nuclei and marker annotations supply category-specific targets; untyped nuclear foreground and some image classes supply proxy targets. For mask-derived targets, MedSAM3 retains the fraction of crop pixels in each tissue class; nuclei-derived targets and image-class targets are binary. SAM2 binarizes these tissue targets at greater than zero. Classification BCE supervises only the classes listed in the final column; all other classes, including background, are unknown for that loss. The separate auxiliary-map objectives use the tissue vector without this mask (Supplementary Methods section 1.2).
Supplementary Table 1 Dataset-specific training-annotation mappings. Target IDs are 0, background; 1, neoplastic; 2, inflammatory; 3, connective; 4, epithelial; 5, dead/necrotic; and 6, gland. Arrows map source labels to target IDs. An empty target means no positive tissue label, not exclusion of the image. The last column lists tissue classes eligible for classification BCE.
| Source | Conversion | Supervised classes |
|---|---|---|
| Pixel-labelled sources | ||
| BCSS | Source IDs 1, 19, 20 → 1; 3, 10, 11 → 2; 2, 14, 16, 18 → 3; 8 → 4; 4 → 5; 13 → 6; 0, 5, 6, 7, 9, 12, 15, 17, 21 → 0. Remapped zero pixels are excluded from supervised Dice/BCE and the known-background penalty. | 1–6 |
| GlaS | Annotated gland objects → 6; remaining pixels → 0. The source train, test-a and test-b images are pooled before the study partition. | 6 |
| DigestPath2019 | Grayscale mask > 127 → 1, otherwise → 0. Only paired positive images with nonempty foreground are retained; the negative-image directory is excluded. | 1 |
| WSSS4LUAD | Source IDs 0 → 1, 1 → 3, 2 → 4; other values → 0. Images and masks come from the source validation subset before the study partition. | 1, 3, 4 |
| BACH whole slides | Preprocessed integer mask IDs are retained without further remapping. Consistency with the XML-to-mask conversion script has not been verified. | 1, 4 |
| Auxiliary image-level sources | ||
| NuCLS | Images and masks are from EvaluationSet. Red-channel IDs 1, 2 → 1; 3 → 3; 4–8 → 2. IDs 0, 9 and ≥ 253 provide no positive tissue target; only image-mask pairs are loaded. | 1, 2, 3 |
| PanNuke | Images and masks are from Part 1. Positive pixels in source channels 0, 1, 2, 3, 4 imply tissue IDs 1, 2, 3, 5, 4, respectively. | 1–5 |
| CoNIC2022; Lizard | Nucleus IDs 1, 3, 4, 5 → 2; 2 → 4; 6 → 3. Any mapped nucleus establishes image-level presence. | 2, 3, 4 |
| MoNuSAC | Epithelial → 4; lymphocyte, macrophage and neutrophil → 2. Ambiguous/artifact and unrecognized annotations provide no positive target. | 2, 4 |
| Kumar; CPM15; CPM17; TNBC | Binary nucleus foreground is assigned to ID 1 before deriving presence. This loader proxy does not distinguish the cell types in untyped nucleus annotations. TNBC uses a grayscale threshold of 127; the other sources use positive instance IDs. | 1 |
| Janowczyk | Nuclear mask pixels > 127 → 4 for image-level presence. | 4 |
| SegPath | panCK → 4; CD3/CD20, CD45RB, MIST1 and MNDA → 2; aSMA and ERG → 3. CD235a and unknown markers yield an empty target. Presence targets derive from positive marker-mask pixels. | 2, 3, 4 |
| NCT-CRC-HE-100K | TUM → 1; LYM → 2; MUS and STR → 3; NORM → 4; DEB → 5. ADI, BACK and MUC yield empty targets but remain eligible images. | 1–5 |
| BACH microscopy | Benign, InSitu and Invasive → 1; Normal → 4. | 1, 4 |
| MHIST | SSA → 1; HP → 4. | 1, 4 |
| PatchCamelyon17; LungColon | The loader assigns ID 1 to every loaded image; it does not read a per-image tumour/non-tumour class. LungColon includes the normal-tissue directories colon_n and lung_n. | 1 |
| SkinCancer | All loaded images receive ID 1, including images in the source’s 12 non-tumour categories and four tumour categories. Source class labels are not used. | 1 |
| Osteosarcoma | Viable → 1; Non-Viable-Tumor → 5; Non-Tumor yields an empty target. | 1, 5 |
Zero-valued mask pixels in GlaS, DigestPath2019, WSSS4LUAD and the preprocessed BACH whole slides are treated as known negatives for their annotated tissue classes; they do not establish absence of all other biological tissues. Unlisted source values default to zero in lookup-table conversions. Nucleus or marker annotations assigned zero contribute no positive tissue target. In particular, an empty auxiliary target is distinct from a missing annotation. Eligible classes still receive zero targets in classification BCE.
Auxiliary proxy labels. SkinCancer and LungColon assign neoplastic presence to images from both tumour and non-tumour source categories; BACH microscopy also maps its Benign category to neoplastic. These proxy labels may introduce noise into tissue recognition and auxiliary-map supervision. Their effect on final segmentation performance was not quantified separately. For SkinCancer, the tile-level training and auxiliary holdout partitions share source cases and therefore do not provide case-independent validation. SkinCancer is not included in the final pixel-level segmentation test sets.
(a) Segmentation training and evaluation data

Sample count · shared log scale (1–1M). R ROI · T tile · W WSI · S specimen

(b) Organ sample composition

Counts: ROIs, tiles, WSIs or specimens, by source.
(c) Tissue-label prevalence

k: supporting sources; —: not annotated
Supplementary Figure 1 Segmentation datasets, organ composition and tissue labels. (a) Data sources. Counts use the labelled dataset-specific units on a logarithmic axis. RINGS tumour and gland segmentation reuse the same images, counted for each task; AGGC counts specimens. (b) Organ composition. Circle area represents each organ's share of samples; mixed and unspecified sources remain separate. (c) Tissue-label prevalence. Circle area represents the proportion of samples containing each label, averaged equally across datasets with suitable annotations. Labels can co-occur; prevalence describes label presence, not tissue area. (Notation: ROI, region of interest; WSI, whole-slide image. A dash denotes unavailable annotations, not zero prevalence. Blue denotes training and internal tests; yellow denotes external tests.)
1.2. Architecture, training diagrams and tissue-evidence outputs
Backbone construction, parameter freezing and auxiliary feature routes are specified in Methods, Backbone architectures and Training loss definitions.
Diagram conventions. In Supplementary Figs. 2 and 3, flames mark optimized parameters, padlocks mark fixed parameters and numerals below flames identify stage-specific optimization. Stage colours indicate when an objective is introduced or modified; tissue colours identify biological classes. Forward inputs are distinguished from supervision and initialization references. Spatial and global feature separation are terms within one functional group; feature and probability glyphs are schematic.
Tissue-evidence outputs. The probability-to-label conversion and ROI-fraction calculation are specified in Methods, Tissue-evidence outputs. Supplementary Figure 2(e) shows the aligned outputs; the detailed reporting inputs and identifier handling are described in Supplementary Methods section 2.2.
1.3. Training budgets, checkpoint selection and comparisons
The training phases, budgets and checkpoint-selection procedure are summarized in Methods, Optimization, sampling and checkpoint selection. Supplementary Table 2 gives the optimizer settings. The sampling, augmentation and objective implementation details below specify these training procedures.
Supplementary Table 2 Segmentation optimization settings. Both backbones use AdamW with , , , weight decay 0.01 and random seed 42. Configured phase budgets are given in Methods.
| Setting | MedSAM3 | SAM2 |
|---|---|---|
| Initial learning rates | Supervised adaptation: visual adapters and class embeddings, . Joint supervision and focal refinement: visual adapters and configured auxiliary-parameter group, ; class embeddings, 0. | Initial fine-tuning: visual adapters and decoder, . Subsequent supervised adaptation: ; joint supervision and focal refinement: . Auxiliary-head rate, . |
| Cosine schedule | Adaptation: horizon 5,000 optimizer updates, clipped at 1% of each initial rate. Continuation: horizon 2,500 optimizer updates, minimum 0. | For configured microsteps, horizon optimizer updates; minimum rate is 1% of the smaller initial adapter and decoder rates. |
| Gradient accumulation | Loader positions count all samples, including skipped samples with no loss. At positions 8, 16, ... that contribute a loss, accumulated gradients are updated. Losses are not divided by eight. At epoch end, remaining gradients are updated if the loss-bearing sample count is not divisible by eight. | Eight microsteps per update; each loss is divided by eight. A final partial window is updated at the last microstep. |
| Scheduler updates | Once per optimizer-update boundary. The training iteration count advances per loss-bearing sample, separately from the scheduler counter. | Once per optimizer update, including the final partial window. |
| Mixed precision | BF16 autocast with gradient scaling. | CUDA autocast with gradient scaling. |
| Gradient clipping | Segmentation and classification parameter groups clipped separately to norm 1. | Decoder plus visual adapters, and auxiliary heads, clipped separately to norm 1. |
| Evaluation scheduling | Every 1,000 adaptation iterations and 500 continuation iterations. | Configured for 1,000 initial fine-tuning microsteps and 500 subsequent microsteps; evaluations occur at coinciding optimizer updates and at the final microstep. |
For MedSAM3, the iteration count advances for samples contributing a loss; the scheduler advances at optimizer updates. MedSAM3 sampling. During joint supervision and focal refinement, pixel-labelled images are indexed by the tissue classes they contain. Each image-class pair is sampled with replacement with weight , where is the number of datasets containing class and is the number of pairs for that class in dataset . The 492 pixel-labelled images yield 842 pairs. A separate shuffled loader supplies auxiliary images, replacing the dense sample at every sixth loader position, starting with the first position of each epoch. Both loaders use one image per batch and four workers.
MedSAM3 augmentation. Images are rescaled to a 40-times-equivalent magnification using bilinear interpolation; masks use nearest-neighbour interpolation. Images smaller than the crop are zero-padded on the right and bottom. Dense continuation crops are centred on a randomly chosen target-class pixel, with random cropping when the target class is unavailable. Auxiliary crops are centred on an annotated foreground pixel when available and otherwise sampled randomly. Training applies horizontal flipping with probability 0.5, independent brightness, contrast and saturation factors sampled uniformly from 0.8–1.2, and hue shifts from to 0.05. Evaluation uses centre crops without augmentation. For auxiliary tissue recognition and global prototype contrast, an additional view uses a random crop with side lengths scaled by a uniform factor of 0.7–1, horizontal flipping with probability 0.5, brightness, contrast and saturation factors of 0.6–1.4, and hue shifts from to 0.07. Auxiliary probability-map objectives use the original loader crop. Padding is retained in the images used for tissue recognition and in the probability maps used for multiple-instance supervision, absent-class suppression and entropy. These auxiliary objectives have no spatial content mask.
SAM2 sampling. The foreground-crop probability is 0.5. The SAM2 implementation draws training samples with replacement. Its initial weight is 0.7 times the class/dataset-balancing weight plus 0.3 times the sum, over declared tissue classes, of ; missing class/dataset scores default to 0.5. Auxiliary images use a shuffled loader.
Gradient routes. In both continuation stages, visual adapters and auxiliary task parameters are trainable; the SAM2 semantic FPN remains trainable and MedSAM3 class embeddings remain fixed. Tissue recognition uses pooled features; spatial contrast uses pixel labels or image-label-constrained pseudo-labels (Supplementary Figs. 2(d) and 3(b)). SAM2 tissue recognition updates its task predictor and visual adapters. In MedSAM3, tissue recognition on pixel-labelled images uses detached features; on auxiliary images, tissue-presence prediction can update visual adapters, whereas organ prediction uses detached features. Spatial feature contrast updates the projection and visual adapters in both
(a) A shared tissue vocabulary

(b) Harmonizing heterogeneous image inputs

(c) PathXAI-Seg (MedSAM3) architecture

(d) Stage-wise training objectives

(e) Inspectable spatial evidence at inference

Supplementary Figure 2 PathXAI-Seg (MedSAM3) architecture and training. (a),(b) Tissue labels and input harmonization. Gland is a structural label; white BCSS mask pixels are unannotated. (c) Architecture. (d) Training stages. (e) Tissue evidence outputs. Tissue fractions use all ROI pixels; foreground is reported separately. Implementation is described in Supplementary Methods sections 1.2 to 1.2. (Notation: ROI, region of interest. Feature stacks and maps are schematic. Solid arrows carry features, predictions or conditioning; dashed arrows carry labels (blue) or detached prototypes (purple), not gradients. The key defines parameter states and training stages.)
(a) SAM2 semantic segmentation architecture

(b) Stage-wise training objectives

Supplementary Figure 3 PathXAI-Seg (SAM2) architecture and training. (a) Architecture. Hiera and its neck retain frozen weights; visual LoRA and the semantic FPN are trained. Multiscale neck features produce tissue probability maps. (b) Training objectives. Supervised adaptation, joint supervision and focal refinement use the objectives supported by each sample's labels. The deepest neck feature supplies spatial projection and pooled tissue prediction; image-level logits represent tissue presence. Objective-specific heads train during joint supervision and focal refinement. SAM2 uses task-adapted initialization and a distinct training budget; shared vocabulary and evidence outputs appear in Supplementary Fig. 2. (Notation: LoRA, low-rank adaptation; FPN, feature pyramid network; BCE, binary cross-entropy; H&E, haematoxylin and eosin. Flames denote trainable parameters; numerals restrict training to the indicated stages. Locks denote frozen parameters. Colours mark objective introduction or modification. Features and tissue maps are schematic.)
architectures. Pseudo-label identities are non-differentiable, but their confidence weights retain a probability-map gradient path.
Objective coefficients. For MedSAM3, supervised adaptation uses Dice and BCE weights of 1 each and no auxiliary objectives. Joint supervision and focal refinement retain these weights and enable a known-background probability penalty with weight 1 on fully annotated sources. Area and shape regularizers each have weight 0.001; the classification coefficient is 1; image-label multiple-instance, absent-class and entropy terms have weights 0.1, 0.01 and 0.01. Spatial contrast has weight 0.005 for mask-labelled images and half this weight for image-label-constrained pseudo-labels. The probability-margin term has weight 0.0001 and margin 0.1; the global feature-prototype term on auxiliary images has weight 0.03. Cell-density conditioning, organ-prompt bias, gland-lumen, density-compatibility, separate background-suppression and BYOL terms are inactive; auxiliary tissue classification remains active. Fixed class embeddings receive no prompt-orthogonality updates in the continuation phases.
The classification coefficient is multiplied by task-specific factors. MedSAM3 uses 0.5 for tissue-presence BCE and 1 for known-organ cross-entropy. On pixel-labelled images with an unknown or mixed organ, confident tissue pseudo-targets use a factor of 0.3; predicted-organ pseudo-targets use 0.5. Organ supervision on auxiliary images begins after 500 iterations; the pixel-labelled route has no corresponding warmup gate. Tissue pseudo-targets retain probabilities above 0.7 among supervised classes; organ pseudo-targets use the most probable class. Tissue BCE applies the supplied known-label mask. The auxiliary multiple-instance, absent-class and global-prototype terms derive binary presence from positive tissue targets, without applying that BCE mask.
SAM2 uses the same continuation coefficients for scale, shape, tissue recognition, multiple-instance supervision, absent-class suppression, entropy and spatial contrast. Its known-background penalty has weight 1 in all three phases, where annotations are complete; it has neither the MedSAM3 global prototype term nor language-initialized class embeddings. For partial annotations, the Dice/BCE exclusion of unannotated pixels does not imply that every geometry or auxiliary objective uses the same masking rule.
Checkpoint selection. For both backbones, we retained the checkpoint with the best training-set performance; no separate validation set was used. The 124 internal test samples and external datasets were used only for evaluation. The selected final MedSAM3 checkpoint is at iteration 2,500, with optimizer counter 352 and learning rate . The initial SAM2 fine-tuning checkpoint is at microstep 7,000 (875 optimizer updates), and its final checkpoint is at microstep 2,500 (313 optimizer updates).
Training stages and refinement branches. The MedSAM3 comparisons include successive training checkpoints and refinement branches initialized from a common checkpoint (Supplementary Table 44). The refinement branches are separate from the final sequential checkpoint. Each training run is represented by its selected checkpoint. Successive stages include additional training and are not budget-matched single-objective interventions.
Objective-weight configurations. Joint-supervision comparisons change selected objective weights (Fig. 5(f) and Supplementary Table 44). The label-guided-localization deletion sets the auxiliary-map multiple-instance, absent-class and entropy loss weights to zero; it does not remove auxiliary images or all auxiliary recognition and contrastive tasks. The scale/shape deletion zeros the two regularizer weights; the intra-image-contrast variant zeros its spatial-contrast weight. In the available reference implementation, this weight also gates the auxiliary-map multiple-instance, absent-class and entropy terms. Their activation in the evaluated runs requires confirmation, so this comparison is interpreted at the configuration level.
1.4. Validation estimands, pairing and uncertainty
Baseline implementations, Dice/IoU definitions and task- and organ-weighted calculations are specified in Methods, Evaluation and statistical analysis of segmentation. Test strata are breast, colorectal and lung internally, and colorectal, lung, prostate and liver externally; auxiliary training includes additional organs. METU-CCTGS is assigned to colorectal and AGGC and RINGS to prostate. External foreground annotations cover tumour regions in ACDC-LungHP, PAIP2019, AGGC and RINGS tumour, and gland structures in RINGS gland. METU-CCTGS uses the broader foreground mapping described below. Thus, external pixel-level validation covers lung, liver, prostate and colorectal tissue; inflammatory, connective, epithelial and dead/necrotic outputs are evaluated only where internal reference annotations are available.
Scores from different methods are paired by sample ID, using filenames and fixed ordering where needed. Resampling uses available source clusters or specimens. Dataset-specific units, pairing rules and cluster counts are provided in Source Data. The shared-draw bootstrap and paired-gain calculations are specified in Methods, Evaluation and statistical analysis of segmentation.
Estimates from small numbers of sources, particularly the two BACH whole slides and eight RINGS source clusters, are interpreted descriptively because resampling can capture only limited between-source variation.
For the main comparison, class-specific Dice and IoU average the available scores for each reference-present class within each dataset. To compare samples with one or multiple scored reference classes, we first average class scores within each sample and then average samples within the group (Supplementary Table 42). Source Data also provides foreground-only sample means, excluding background and samples with no scored foreground class. Samples are images or ROIs, except for AGGC specimen aggregates. These descriptive summaries retain the original predictions and label mappings; the primary sample-class-weighted estimates are unchanged.
nnU-Net uses the 100-epoch 2D RGB trainer, fold 0 and its final checkpoint. HoVer-Net fine-tunes its encoder and semantic feature-pyramid head for five epochs using cross-entropy, AdamW, batch size 4 and learning rate ; validation Dice selects epoch 2. CONCHSeg uses patch-classification cross-entropy, AdamW and a cosine learning-rate schedule, with batch size 50, learning rate 0.01 and weight decay 0.01 over 10,000 training steps. Its checkpoint maximizes validation Dice, evaluated every 500 steps.
RINGS tumour and gland are separate tasks in the equal-task macro but reuse all 500 images and eight source clusters. The primary task-stratified bootstrap resamples them separately. A sensitivity analysis coupled draws from the shared sources of the two tasks; its results are reported in Supplementary Results section 10.1.
1.5. Shared external comparison with pathology segmentation systems
The common evaluation set for PathSegmentor, VISTA-PATH and both PathXAI-Seg variants was fixed before inspecting baseline accuracy. It contains 5,000 ACDC-LungHP images, 5,000 PAIP2019 images and 16 METU-CCTGS images/ROIs, with 132, 50 and 16 source clusters, respectively. Disclosed training datasets determined eligibility, so RINGS was excluded because it appears among PathSegmentor's training datasets, and AGGC because it appears in the VISTA training table. This dataset-level check does not establish absence from all inherited foundation-model pretraining. The comparison evaluates the released systems with their existing training budgets.
All four configurations use the same class-presence condition, label mapping, field-of-view convention and metric definitions. Reference annotations supply present class IDs, not spatial pixel prompts; these tasks map to IDs 0 and 1 within the unchanged seven-label vocabulary. VISTA receives a box spanning the full padded input, [0, 0, 512, 512]. Each VISTA class query returns foreground and background probabilities. Whenever background is requested, the task's foreground classes are queried even if absent from that image; their minimum native background probability supplies the background channel. Requested foreground scores populate their corresponding channels, and unrequested class channels are zero. Native model input sizes are retained (PathSegmentor, 1,024; VISTA, 512 pixels). Scores are mapped back to the image grid and averaged where predictions overlap; each pixel is assigned the class with the highest score. For VISTA, this procedure differs from the official pipeline, which uses Otsu thresholding and overwrites masks in area order, and from its native learned no-box condition.
Each configuration is evaluated on the same 12,448 reference-present image-class pairs. Dataset means retain the original weighting, including background when present; the shared-set macro equally weights the three datasets. Point-wise 95% percentile CIs use 10,000 source-cluster bootstrap draws (seed 20260818), with common draws across methods for paired differences. Intervals are not adjusted for multiple comparisons. METU retains the original grayscale-nonzero foreground, including normal mucosa; this evaluation therefore measures more than tumour segmentation. IoU, paired contrasts and descriptive class-set strata are retained with the source tables. The descriptive strata do not carry subgroup significance tests.
Class-specific summaries average scores over images containing the respective reference class. We also summarize images containing both foreground and background, averaging the two class scores within each dataset and then weighting datasets equally (Supplementary Table 43). These summaries retain the original predictions and label mappings.
The annotations in Fig. 5(c) show differences between point estimates; they do not provide confidence intervals or significance tests. This class-presence-conditioned benchmark differs from reporting, where tissue composition is unknown. Report evaluation uses PathXAI-Seg outputs in the shared tissue vocabulary. Segmentation transfer and reporting-policy comparisons are evaluated separately; the effect of segmentation accuracy on report performance was not isolated.
1.6. Selection of qualitative examples
For PAIP2019, three neoplastic-present candidates were identified using per-image scores. These were the candidate with the highest PathXAI-Seg Dice and the two with the largest gains over the stronger of nnU-Net and MedSAM3 fine-tuning. Each model was evaluated once per candidate on the same full field. The displayed candidate had the highest full-field PathXAI-Seg mean Dice over reference-present classes, including background. The displayed MedSAM3 masks are separate inference outputs and have no per-image quantitative scores attached. Dataset-level comparisons use the complete test sets (Supplementary Tables 41.1 to 41.4). The physical pixel size of these displayed crops could not be verified through their complete resampling history, so no micrometre scale is assigned to them.
2. Cohorts and multi-slide report generation
Comparisons and scoring are specified in Supplementary Methods section 3; results are reported in Supplementary Results sections 1, 2 and 4.
2.1. Cohorts and reference fields
TCGA slides, generated reports and references were linked by case (Supplementary Fig. 4). Both public reference sets used OCR-processed TCGA pathology-report text released by WsiCaption [18], which we restructured into a common format using Qwen3.6-27B. We initially selected 1,708 public cases, comprising a 508-case initial subset and a 1,200-case expansion. Manual verification identified 51 cases whose supplied site descriptions contained disease names. These cases were excluded from all public report evaluations and their overlapping subsets before calculating results and confidence intervals. One further case was excluded because its source WSI was corrupt. The final public benchmark comprised 1,656 cases, including the 456-case public development subset and the 1,200-case public evaluation cohort (Supplementary Table 16). The development subset was randomly sampled. Both subsets share the report source and Qwen restructuring step.
The excluded cases comprised 17 each from the cholangiocarcinoma, pheochromocytoma/paraganglioma and sarcoma groups. Their supplied descriptions included “bile duct / cholangiocarcinoma tissue”, “adrenal medulla / paraganglia / pheochromocytoma tissue” and “soft tissue / sarcoma”. The exclusion also applies to the overlapping policy and pathologist-assessment subsets.
Public cases required a case-matched local whole-slide image (WSI) and readable reference text. Automated screening required at least 100 characters, an alphabetic fraction of at least 40%, and non-duplicate normalized reference text. Slide checks required readable thumbnails and sampled regions, micrometre-per-pixel values between 0.1 and 1.0 and no more than 2% axis anisotropy. Eligible cases were shuffled within cancer type and selected by cycling through cancer types. The same screening and sampling approach was used across the public cohort; the 1,200-case set used seed 20260920 and did not overlap with the public development subset.
The public cohort was sampled from TCGA cancer projects and was not designed to represent the distribution of benign, borderline and malignant diagnoses encountered in routine pathology practice.
Reference-report processing
The supplied OCR text was reorganized into eight report sections using Qwen3.6-27B. Reference processing included consistency checks against the source OCR text using OpenAI Codex (GPT-6.1). Diagnostic entities, grade and morphological findings were extracted using the normalization and applicability rules in Supplementary Methods sections 3.6 and 3.7.
Private cohort sources and eligibility
The private cohort comprises 152 cases from six hospitals, with 76 breast, 62 prostate and 14 colorectal cases. Each case has one reference report from each of two pathologists; applicable case counts are reported separately for each metric in Supplementary Tables 26.1 to 26.11.
Private cases were randomly sampled within disease categories from each contributing hospital cohort. Breast cases were collected in 2026, and prostate and colorectal cases were collected in 2020–2025. Detailed hospital-specific eligibility criteria were not available to the study team. Patient demographics, including age and sex, were not collected or analysed as study variables.
Supplementary Table 3 Private cases by anatomical site and source hospital. Hospital names link to official institutional, university or government sources.
| Site | Abbrev. | Hospital | Cases |
|---|---|---|---|
| Breast | TTSH | Tan Tock Seng Hospital | 76 |
| Prostate | ZSH | Zhongshan Hospital, Fudan University | 12 |
| Prostate | CHH | Changhai Hospital | 12 |
| Prostate | CZH | Shanghai Changzheng Hospital | 12 |
| Prostate | HBGH | Hebei General Hospital | 12 |
| Prostate | JPH | Jiangsu Province Hospital | 14 |
| Colorectal | CZH | Shanghai Changzheng Hospital | 14 |
| Total | Six hospitals; three anatomical sites | 152 |
ZSH, CHH, CZH, HBGH and JPH are abbreviations defined for this manuscript; TTSH is the hospital's established abbreviation. Jiangsu Province Hospital is also the First Affiliated Hospital of Nanjing Medical University. Hospital assignments were supplied by the investigators and matched to the evaluated cases. The accompanying Source Data provide aggregate site/hospital counts and official-name source links.
Cohort summaries and Source Data
Slide counts summarize available WSIs linked to each public case; private slide linkage is unavailable. Field availability is calculated across the full cohort separately for each reference set. Cancer-type target availability in the public cohort follows TCGA labels; availability of a specific diagnosis in the private cohort is determined separately for each reference set.
The accompanying Source Data list case IDs and the cases included in the input-policy, HistGen/HistoGPT and pathologist comparisons, whose subsets overlap. The public_cohorts directory contains case membership and method availability, and aggregate_results contains the numerical results and their table index. Private records remain restricted; Supplementary Table 3 gives their aggregate source composition.
Public demographic characteristics were retrieved from the NCI Genomic Data Commons and linked by TCGA case identifier. Supplementary Table 4 summarizes age, sex at birth, race and ethnicity, together with available slide types classified from TCGA barcodes.
Supplementary Table 4 Public cohort characteristics and available slide types. Values are counts (%) unless indicated. Clinical characteristics use GDC metadata linked by case ID; slide percentages use the recoverable slide inventory. IQR, interquartile range.
| Characteristic | Development subset | Evaluation cohort |
|---|---|---|
| Cases | 456 | 1,200 |
| Age at GDC index (years) | ||
| Available | 453 (99.3%) | 1,198 (99.8%) |
| Median (IQR) | 59.0 (50.0–67.0) | 58.0 (47.0–68.0) |
| Missing | 3 (0.7%) | 2 (0.2%) |
| Age privacy flag | 5 (1.1%) | 12 (1.0%) |
| Sex at birth | ||
| Female | 204 (44.7%) | 569 (47.4%) |
| Male | 252 (55.3%) | 631 (52.6%) |
| Race recorded by GDC | ||
| White | 316 (69.3%) | 912 (76.0%) |
| Black or African American | 44 (9.6%) | 107 (8.9%) |
| Asian | 40 (8.8%) | 96 (8.0%) |
| American Indian or Alaska Native | 0 (0.0%) | 5 (0.4%) |
| Unknown / not reported | 56 (12.3%) | 80 (6.7%) |
| Ethnicity recorded by GDC | ||
| Hispanic or Latino | 15 (3.3%) | 67 (5.6%) |
| Not Hispanic or Latino | 308 (67.5%) | 899 (74.9%) |
| Unknown / not reported | 133 (29.2%) | 234 (19.5%) |
| Available slide inventory | ||
| Slides with recoverable identifiers | 934 | 3,121 |
| DX (diagnostic) | 405 (43.4%) | 1,337 (42.8%) |
| TS (top) | 374 (40.0%) | 1,339 (42.9%) |
| BS (bottom) | 150 (16.1%) | 433 (13.9%) |
| MS (middle) | 5 (0.5%) | 12 (0.4%) |
Age at index is the age on the reference date recorded by GDC; this date is diagnosis for 1,655 cases and unspecified for one. Released age values, including those flagged as modified for privacy, are retained; the privacy flag is unreported for one evaluation case. Age summaries exclude missing values. Race and ethnicity are reported as recorded by GDC, with unknown and unreported values grouped in the table. Slide codes are derived from TCGA barcodes. Development-slide counts differ between this inventory (934) and the earlier aggregate (937); the three-slide discrepancy remains unresolved. Counts describe available slides, not the images supplied to each reporting run. Source Data provide per-case metadata and slide codes.
Overlap with segmentation training data
We matched TCGA patient identifiers in the segmentation training sample lists to the public report cases. A sensitivity analysis excluded all matching cases from the public evaluation cohort, applying the same exclusion to every reporting method. Reference applicability and the paired-case bootstrap procedure were unchanged (Supplementary Results section 1.3). The matching covers identifiable TCGA cases; sources without recoverable patient identifiers and undisclosed foundation-model pretraining data could not be assessed.
2.2. Reporting configurations, inputs and prompts
Core and complete configurations, their inference settings and the diagnostic selector are specified in Methods, Reporting configurations and inference and Diagnostic candidates and selection. Supplementary Figure 5 details candidate selection and reinspection; the overall workflow is shown in Fig. 6. Input-policy variants are specified separately in Supplementary Methods sections 3.3 and 3.4.
Image inputs and identifiers
PathXAI-Report receives H&E images, aligned overlays and tissue statistics, with known-site context and no hidden segmentation features or embeddings (Supplementary Methods section 1.2). Anatomical site was also provided to the pathologists, at their request, when they authored the private reference reports (Methods, Pathologist reference-report authoring). Screening of the supplied site descriptions is described in Supplementary Methods section 2.1.
For a square diagnostic ROI, the H&E image and aligned overlay are each resized to pixels and placed side by side, with H&E on the left. The resulting -pixel composite includes a 28-pixel label strip. The entire composite is then resized to a maximum edge of 768 pixels, leaving approximately pixels per image panel; a standalone square H&E image uses pixels. Parent and zoom composites are initially saved at JPEG qualities 85 and 88, respectively, and the inference client transmits them at quality 75.
When the evidence assessment requests additional image detail, zoom can extract the central pixels of a -pixel parent ROI, subject to the acquisition limits. The crop uses the source slide at the parent's level or the stored parent image, with the corresponding parent mask cropped to match. It is resized and paired with its overlay using the same transmitted image budget, so the smaller field occupies the same panel size. For level-0
(a) External cohorts and evaluation subsets

Filled bars: source cohorts. Outlined bars: overlapping public subsets, not additional cohorts.
(b) Organ and source composition

Public bar length: cases (0–400 scale)
| PRIVATE COHORT · SITE / HOSPITAL | n = 152 | ||
|---|---|---|---|
| Site | Abbrev. | Official English name | n |
| Cases | 0 | ||
| Breast | TTSH | Tan Tock Seng Hospital | 76 |
| Prostate | ZSH | Zhongshan Hospital, Fudan University | 12 |
| Prostate | CHH | Changhai Hospital | 12 |
| Prostate | CZH | Shanghai Changzheng Hospital | 12 |
| Prostate | HBGH | Hebei General Hospital | 12 |
| Prostate | JPH | Jiangsu Province Hospital | 14 |
| Colorectal | CZH | Shanghai Changzheng Hospital | 14 |
(c) Available slides per case

(d) Assessable reference fields

Reference availability (%), not report accuracy
(e) Reference comparisons and pathologist ranking and correction assessment

Supplementary Figure 4 Reporting cohorts and evaluation design. (a) Cohorts and overlapping evaluation subsets. (b) Organ and hospital composition. (c) Available slides per case. (d) Reference-field applicability. Public cancer-family targets and private specific diagnoses define diagnostic applicability. Critical-positive measures require a documented positive finding; private reference sets are evaluated separately. (e) Evaluation tasks. Reference-based automated scoring and separate pathologist ranking and correction assessment. Cohort definitions are in Supplementary Methods section 2.1 and Supplementary Table 3. (Notation: WSI, whole-slide image; P1/P2, pathologists' reference sets; OCR, optical character recognition. Outlined bars identify overlapping subsets; counts describe cohort composition.)
parent ROIs, physical field width depends on the slide calibration m in m per pixel, giving 4,096m for the parent and 2,048m for the zoom. The 0.5 m-per-pixel setting in ROI ranking applies to CONCH tiles.
(a) V/T candidate selection
Shared inputs: current H&E, segmentation overlays and known specimen site

(b) Reinspection and stopping rules

Supplementary Figure 5 Diagnostic candidate selection and reinspection rules. (a) Candidate selection. Validity, tumour-family, invasion-state and specificity checks select between V and T. The selected candidate is subsequently constrained by the subtype-sufficiency assessment (S; Fig. 6(e)). (b) Reinspection. The Boolean reportability decision, acquisition limits, availability of fresh ROIs and diagnosis stability govern further acquisition. All exits proceed to a final diagnostic pass. Detailed rules are given in Methods, Diagnostic candidates and selection and Reinspection and acquisition limits. V/T denote diagnostic candidates; ROI, region of interest.
PathXAI-Report's candidate-ROI descriptions identify images by within-case ROI order and omit file paths and case or slide identifiers. The inference client reads images locally and sends them as inline image data to the configured self-hosted inference service, without exposing local file paths or providing filesystem tools to the model. Auxiliary writer and claim-check inputs nevertheless retain ROI identifiers containing TCGA identifiers and coordinates in the public evaluation. Prompts additionally prohibit diagnostic inference from identifiers or coordinates. Reference reports are used only for subsequent evaluation.
In the public-comparison implementations, Qwen + H&E and MedGemma also use ordinal ROI descriptions for report writing, but their claim-check graphs can retain raw ROI identifiers. PLIP-guided Qwen includes the final 40 characters of each selected ROI identifier in its textual feature description. DeepSeek + H&E and GLM + H&E omit explicit case identifiers, cohort codes and file paths from prompt text; PRISM2 uses an anonymous slide name and a site-conditioned question. HistGen and HistoGPT generate reports from image features without case identifiers in their generation inputs.
Prompt stages and message assembly
The templates below reproduce the instructions and requested output formats of the documented core and complete implementations. Angle-bracket placeholders identify dynamically inserted content; JSON braces and example values belong to the original templates. The machine-readable supplement report_prompts.json retains the prompt functions, source expressions, output definitions and parsing rules. Complete case-specific request payloads were not retained for the original experiments.
Each call supplies its instructions as user content, without a separate system message. The request places the prompt text before the current images, encoded as inline JPEGs in the order supplied by the stage. Earlier outputs enter through explicit fields such as the current diagnosis, evidence gaps and claim assessments; these two configurations do not use the optional conversation-history wrapper. Known site bypasses the site-prediction call. The optional morphology reader is disabled in both configurations, so its description fields are empty; the shared templates retain their generic morphology headings and instructions.
| Stage | Principal inputs | Requested output |
|---|---|---|
| ROI selection | Ranked candidate images and candidate list | Selected indices and reasons |
| Broad lineage | Current ROI images, site and available tissue/context summaries | Lineage hypotheses and discriminating features |
| Subtype sufficiency | Current evidence, broad hypotheses and subtype candidates | Supported diagnostic level and missing evidence |
| Diagnostic candidates | H&E-overlay images and site; complete V also receives KEEP | Diagnosis, morphology, ancillary observations and recommendations |
| Evidence sufficiency | Current ROI images, diagnosis and site | Reportability and image/non-image evidence gaps |
| Claim assessment | Claims, evidence graph, tissue summaries and ROI images | Per-claim support status, cited evidence and reason |
| Report writing | Diagnostic state, evidence gaps, ROI images and writing context | Eight-section report |
| Report revision | Draft, diagnostic state and claim assessments | Revised report with the same section structure |
Both configurations use these stages. The complete configuration adds retrieved KEEP context to candidate V, invasion safeguards in candidate selection, a locked diagnostic state for writing, and auxiliary grade-focused images supplied only to the writer. Broad-lineage and subtype-sufficiency calls run once on the current evidence before the V/T candidate pair; the broad-lineage output feeds the subtype-sufficiency call. After candidate selection, a subtype assessment whose supported level is below subtype can broaden an insufficiently supported diagnosis and add its unresolved discriminators to the evidence-gap fields. Both preliminary outputs also enter the evidence graph. Reinspection repeats this sequence and sufficiency assessment with updated evidence. Candidate selection, knowledge retrieval, acquisition decisions and final lock enforcement are implemented in code; their rules are described in Methods.
Dynamic input fields
The candidate and selected-ROI lists use one-based image order, crop dimensions, ranking scores and available role information. Site placeholders contain the supplied anatomical site or its structured record. Tissue-summary placeholders contain ROI foreground fractions and named non-background tissue fractions. The compact formatter includes up to eight ROI summaries, retaining class fractions above 0.5%; the tissue-evidence policies in Supplementary Methods section 3.4 define the inputs to this formatter. This eight-entry limit applies to the text summary; acquisition can retain up to eleven diagnostic ROIs, with additional writer-only images supplied separately. Retrieved-knowledge placeholders contain disease definitions and subtype candidates. In the diagnosis template, these comprise at most three definitions, each truncated to 300 characters, and eight candidate names with up to three synonyms each. Diagnostic-state, sufficiency, graph and claim placeholders are JSON records produced by the preceding stages. Writer-only ROI identifiers and their role policy enter the auxiliary block. The following templates show which fields actually enter each prompt; unused optional blocks contribute no description.
Initial ROI selection
The candidate list follows the attached image order. The selection budget is three, from the leading eight candidates described in Methods. Returned indices are one-based.
/no_think You are selecting WSI ROI evidence for pathology report generation. You will see candidate ROI images in the same order as the list below. Choose up to <maximum_selected_roi> ROIs that best support diagnosis and report generation.
Selection criteria:
- Must contain viable lesional/tumor tissue when possible.
- Prefer ROIs with diagnostic architecture, cytology, necrosis, invasion interface, or representative tumor.
- Avoid mostly blank/background/artifact/normal tissue.
- Select fewer than <maximum_selected_roi> if fewer are truly useful.
- Do not infer site or diagnosis from filenames, case IDs, directory names, or coordinates.
Candidate list: <candidate_roi_list>
Return ONLY JSON: { "selected_roi_indices": [1, 2], "reason": "why these ROIs are enough or why more would be needed", "roi_scores": [ {"roi_index": 1, "diagnostic_value": 0-5, "tumor_likelihood": 0-5, "tissue_quality": 0-5, "reason": "..."} ] }
] }
Broad-lineage reasoning
This stage proposes broad histogenetic categories and the features needed to distinguish them. The output remains separate from the subsequent specific diagnosis.
/no_think Classify the histogenetic BROAD LINEAGE from the ROI morphology.
CRITICAL: best_broad_type MUST be exactly ONE of these labels: carcinoma | sarcoma | lymphoma | melanoma | glioma | neuroendocrine neoplasm | germ cell tumor | mesothelioma | carcinosarcoma | thymic epithelial neoplasm | neoplasm
DO NOT put a specific diagnosis here (e.g. "Adrenocortical Carcinoma" is NOT a broad type — its broad type is "carcinoma"). If you cannot narrow below "neoplasm", say "neoplasm".
Rules:
- Use only visible ROI morphology, segmentation evidence, morphology evidence text, known/predicted site context, and KEEP background candidate knowledge.
- KEEP is background knowledge, not patient-specific evidence.
- Morphology evidence text is a non-binding descriptive clue, not ground truth.
- Segmentation fractions are localized tissue-composition / ROI-quality evidence, not lineage labels. They may support tumor amount, necrosis, stromal or epithelial-labeled tissue presence, but must not override broad lineage from H&E morphology.
- Low or absent segmentation fractions are not negative exclusion evidence for a lineage or subtype.
- Do not use filenames, case IDs, TCGA codes, directory names, or coordinates.
- If known site is high confidence, site-specific primary lineages remain the default primary space unless multiple ROIs directly support another lineage.
<optional_morphology_rules>
Site: <known_site_json>
Segmentation: <segmentation_summary_json>
<optional_morphology_label>: <optional_morphology_text>
KEEP context: <retrieved_knowledge_json>
Selected ROI evidence: <selected_roi_list>
Return ONLY JSON: { "hypotheses": [ {"broad_type": "one of the allowed labels above", "confidence": "high/medium/low", "supporting_features": ["..."], "main_mimics": ["..."], "missing_discriminators": ["..."]}] ], "best_broad_type": "one of: carcinoma | sarcoma | lymphoma | melanoma | glioma | neuroendocrine neoplasm | germ cell tumor | mesothelioma | carcinosarcoma | thymic epithelial neoplasm | neoplasm", "confidence": "high/medium/low", "reason": "... " }
Subtype sufficiency
This stage assesses the candidate entities and separates image-actionable gaps from unavailable ancillary or clinical information. An absent current diagnosis is inserted as an empty object.
/no_think Judge whether current ROI evidence is sufficient to distinguish site-specific subtype candidates.
Rules:
- Evaluate subtype candidates one by one.
- Use KEEP candidates as a candidate list only; do not treat them as patient-specific evidence.
- Treat morphology evidence suspected diagnoses as non-binding clues.
- D1 segmentation classes are tissue-pattern evidence, not lineage labels.
- Segmentation stats may support tumor richness, necrosis amount, tissue-class composition, and ROI quality only.
- Do NOT use segmentation stats to decide exact subtype, invasive vs in-situ status, histologic grade, or malignancy unless direct H&E morphology also supports that statement.
- Do NOT infer DCIS/in-situ disease, invasion, or subtype from epithelial/glandular fractions, central necrosis, low stromal fraction, or absent segmentation classes alone.
- Low or absent segmentation fractions are not negative exclusion evidence.
- If broad lineage/site is supported but subtype discriminators are missing, recommend a broad/NOS/not-further-classifiable diagnosis.
- Do NOT demote a visually supported likely subtype only because ancillary confirmation, molecular tests, grade, stage, margins, or complete scoring systems are unavailable. Those are limitations/prognostic gaps, not always reasons to erase the best-supported diagnostic entity.
- Use "possible_but_insufficient" when a candidate has some supporting visual features but unresolved differential diagnosis remains; use "supported" when current visual+morphology evidence supports it as the best working diagnosis, even if ancillary confirmation is still recommended.
- Distinguish image-actionable missing evidence from nonimage metadata.
- Do not use filenames, case IDs, TCGA codes, directory names, or coordinates.
- 'recommended_primary_diagnosis' must contain only the diagnostic entity, not phrases like "not further classifiable from ROI evidence".
<optional_morphology_rules>
Site: <known_site>
Broad hypotheses: <broad_hypotheses_json>
Current diagnosis, if any: <current_diagnosis_json>
Site-specific subtype candidates: <subtype_candidates_json>
Segmentation: <segmentation_summary_json>
<optional_morphology_label>: <optional_morphology_text>
Selected ROI evidence: <selected_roi_list>
Return ONLY JSON: { "bestSupported_level": "broad_type/subtype/not_assessable", "recommended_primary_diagnosis": "...", "confidence": "high/medium/low", "subtype_assessments": [ { "subtype": "...", "status": "supported/possible_but_insufficient/unsupported/not_assessable", "supporting_features": ["..."], "missing_discriminators": ["..."], "needed_image_evidence": ["..."], "needed_nonimage_metadata": ["..."] } ] }
], "image_actionable_gaps": ["..."], "nonimage_metadata_gaps": ["..."], "reason": "... " }
Diagnostic candidates
The same template generates the V and T candidate records from the current H&E-overlay composites. Its internal two-step instruction requests a fresh broad-lineage judgement and subtype refinement; it does not insert the earlier broad-lineage or subtype-sufficiency records as text. Numeric tissue summaries enter the preliminary reasoning, claim-assessment and writing prompts. The diagnostic template below does not serialize its segmentation_context argument. Optional morphology text and the chat-history override block are empty in these configurations. Retrieved definitions and candidate names enter the complete configuration's V call; the T call receives no retrieved KEEP text. In the core configuration, V and T are repeated calls with identical prompt and image inputs.
/no_think You are a pathologist making a diagnosis from H&E WSI ROI images.
Specimen site: <known_site>
You have ROI images showing representative tumor tissue.
REASON IN TWO STEPS:
STEP 1 — BROAD LINEAGE (from ROI images ONLY): Look at the ROI images. Determine the broad histogenetic lineage: carcinoma / sarcoma / lymphoma / melanoma / glioma / germ cell tumor / neuroendocrine neoplasm / mesothelioma / other neoplasm
Base this decision on the ROI MORPHOLOGY alone. Do not let any text context below influence this step. The images have the final say.
STEP 2 — SUBTYPE REFINEMENT (from text context + broad from Step 1): With the broad lineage locked from Step 1, use the context below to refine the specific subtype, malignancy, and grade. The context is supplemental — only commit to a subtype when the morphology supports it.
<optional_morphology_block> <retrieved_disease_definitions> <retrieved_subtype_candidates>
Critical evidence-boundary rules:
- These are H&E ROI images unless explicitly stated otherwise.
- Do NOT report actual IHC/molecular positivity or negativity from H&E.
- Morphology evidence and KEEP are supporting context, not ground truth.
- Segmentation context, when provided, is support for localized tissue composition / tumor burden / necrosis / ROI quality only. It cannot determine the primary diagnosis, subtype, invasive-vs-in-situ status, grade, or malignancy by itself.
- Do not change an invasive-vs-in-situ call based only on segmentation stats. If the invasion interface or in-situ architecture is not directly visible in H&E morphology, keep that field uncertain and do not let it replace the primary diagnosis.
- Low or absent segmentation fractions are not negative exclusion evidence against a cancer type or subtype.
- If ROI evidence does not support a specific subtype, leave subtype empty.
Candidate ROIs: <candidate_roi_list>
<chat_history_override> Return ONLY JSON: { "broad_type": "from Step 1: carcinoma/sarcoma/lymphoma/melanoma/glioma/germ cell tumor/neuroendocrine neoplasm/mesothelioma/other", "subtype": "from Step 2: specific entity, or ' ' if not classifiable",
"malignancy": "benign/borderline/malignant", "grade": "histologic grade if assessable, else ''", "primary_diagnosis": "the most specific defensible diagnosis", "confidence": "high/medium/low", "differential": ["alternative 1", "alternative 2"], "tumor_architecture": "growth pattern description", "cytology": "nuclear and cellular features", "necrosis": "present/absent with description", "invasion": "invasive features if visible", "stroma_inflammation": "stromal and inflammatory features", "ihc_observed": "actual IHC/molecular if provided; else 'not assessable from H&E images'", "ihc_molecular": "same as ihc_observed; do not place recommended markers here", "missing_evidence": ["what image evidence is missing"], "recommended_ancillary_studies": ["recommended IHC/molecular/clinical studies"] }
Evidence sufficiency
The Boolean reportability field controls the acquisition loop described in Methods. The model also returns self-reported confidence as high, medium or low.
/no_think Assess whether the current ROI evidence is sufficient for a confident pathology diagnosis.
Current diagnosis: <primary_diagnosis> (site: <known_site>)
Evidence ROIs: <selected_roi_list>
Evaluate:
- Is there enough tumor tissue to characterize the lesion?
- Are key diagnostic features (architecture, cytology, invasion, necrosis) visible?
- What image-observable evidence is missing?
- What non-image information (IHC, molecular, clinical) is needed?
Return ONLY JSON: { "sufficient_for_diagnosis": "Yes/Partially/No", "diagnostic_confidence": "high/medium/low", "missing_image_evidence": ["..."], "missing_nonimage_metadata": ["..."], "recommended_additional_rois": ["type of ROI that would help"], "can_confidently_report": true/false }
Claim assessment
The model receives current ROI images with the claims and their evidence graph. The returned assessment is merged with the tissue-rule checks as described in Methods, Diagnosis-constrained report generation.
/no_think Verify pathology claims against the provided evidence graph and ROI images.
Statuses:
- supported: directly supported by visual ROI evidence, morphology text, or segmentation stats.
- weak: plausible but not directly proven.
- unsupported: no available evidence supports the claim.
- contradicted: available evidence suggests the claim is false.
- not_assessable: cannot be assessed from H&E ROI evidence.
Rules:
- Do not use filenames, case IDs, TCGA codes, directory names, or coordinates.
- KEEP is background knowledge, not patient-specific evidence.
- IHC/molecular/stage/gross/margins are not assessable unless explicitly supplied.
- Cite evidence using ROI ids, evidence::morphology, evidence::knowledge, evidence::subtype_sufficiency, or evidence::sufficiency.
Claims: <claims_json>
Evidence graph: <evidence_graph_json>
Segmentation: <segmentation_context_json>
Return ONLY JSON: { "claims": [ { "claim_id": "C001", "status": "supported/weak/unsupported/contradicted/not_assessable", "evidence": ["..."], "reason": "...}" ], "unsupported_summary": ["..."], "missing_evidence": ["..."] }
Structured report writing
The writer receives the selected image inputs and the diagnostic state. Non-empty tier and differential fields are inserted after the primary diagnosis; the optional staged-diagnosis instruction explicitly repeats that diagnosis. The complete configuration additionally inserts the diagnosis-lock and auxiliary-policy blocks shown below. A structurally invalid draft is retried once with the same prompt and images.
/no_think Generate a structured pathology report from the provided ROI evidence.
Specimen site: <known_site> Primary diagnosis: <primary_diagnosis><staged_diagnosis_instruction><diagnosis_tiers><differential_diagnoses> <diagnosis_lock_block>
Evidence gaps identified:
- Missing image evidence: <missing_image_evidence_json>
- Missing non-image metadata: <missing_nonimage_metadata_json> <optional_morphology_block><segmentation_summary_block><auxiliary_roi_policy_block>
Rules:
-
Only report what is visible in the ROI images or stated above.
-
Do NOT fabricate IHC results, stage, margin status, or gross measurements.
-
If IHC/molecular data were not explicitly provided, write actual IHC results as "Not assessable from H&E images"; recommended stains may be listed separately.
-
If the evidence sufficiency says the case cannot be confidently reported, do not automatically erase the best-supported primary diagnosis. Use the staged primary diagnosis above when it is supported by morphology, segmentation, subtype-sufficiency, or claim verification. Put uncertainty about subtype, malignancy, IHC, stage, margins, or grade in the appropriate sections rather than appending it to the Diagnosis section.
-
The Diagnosis section must contain ONLY the primary diagnosis name. Put malignancy, grade, subtype uncertainty, and limitations in the Stage/Grade or Final Summary sections. Do not merge differential diagnoses into Diagnosis.
-
Be specific about what IS visible — use precise histomorphological terminology.
-
Use segmentation evidence only as localized support for tissue composition, tumor-rich regions, necrosis, epithelial-labeled/stromal tissue classes, or ROI quality. Do not infer IHC, molecular status, margins, stage, clinical outcomes, exact subtype, grade, malignancy, or invasive-vs-in-situ status from segmentation.
-
Do not amplify segmentation/reader evidence. If necrosis is described as focal, trace, limited, uncertain, or low-fraction, do NOT call it extensive, geographic, widespread, or high-grade necrosis.
-
The Diagnosis section must stay aligned with the staged Primary diagnosis above. Do not replace it with a different entity because segmentation stats mention epithelial-labeled tissue, necrosis, tumor burden, or low/absent tissue classes.
-
If a LOCKED FINAL DIAGNOSIS STATE is provided, copy its diagnosis, subtype, malignancy, grade, invasion, and necrosis conclusions into the appropriate report sections. Segmentation or ROI text may support or limit those fields but may not overwrite them.
-
If auxiliary grade-focused ROIs are listed, treat them as secondary grading evidence only. They are not subtype-selection evidence.
-
If a LOCKED REPORT GRADE FIELD is provided, the Stage/Grade section must verbalize that exact grade. Do not contradict it with "grade not assessable"; reserve not-assessable language for stage, margins, molecular/IHC, or other unavailable prognostic fields.
ROI evidence:
<selected_roi_list>
Return the report in this EXACT format (8 sections, each on a new line after the heading):
Specimen/Site:
Diagnosis:
Tumor/Lesion Description:
Key Microscopic Findings:
Invasion/Necrosis/Margins:
Immunohistochemistry/Ancillary Studies:
Stage/Grade/Prognostic Features:
Final Summary:
Diagnosis-lock block. The inserted JSON carries primary diagnosis, broad type, subtype, malignancy, grade, invasion and necrosis from the diagnostic state supplied to the writer.
LOCKED FINAL DIAGNOSIS STATE — do not revise these fields. The report writer must verbalize this state, not perform a new diagnosis:
<locked_diagnosis_json>
Tissue-summary block. The compact JSON representation is truncated to 2,500 characters for writing.
Compact segmentation evidence (localized ROI tissue support; do not use this alone as a cancer-type label):
<compact_segmentation_json>
Auxiliary-image role block. The inserted record identifies the auxiliary ROIs, their count and their writing-only role; its serialized text is truncated to 1,800 characters.
Auxiliary evidence role policy:
<auxiliary_roi_policy_json>
Use auxiliary grade-focused ROIs only for grade, necrosis, cytologic atypia, mitotic activity, and ROI-level quality support. Do not use these auxiliary ROIs to change the primary diagnosis, broad lineage, histologic subtype, specimen site, or invasive-vs-in-situ status unless the main diagnostic ROI set and staged diagnosis already support that change.
Claim-guided report revision
Revision is a text-only call. The report-heading placeholder expands to the same eight headings in the writing template. A failed or structurally invalid revision leaves the draft unchanged; the complete configuration then enforces the locked diagnostic fields in code.
/no_think
Rewrite this structured pathology report so every statement obeys claim verification.
Diagnosis payload:
<diagnosis_payload_json>
Evidence sufficiency:
<sufficiency_json>
Claim verification: <claims_json>
Draft report:
<draft_report>
Rules:
- Supported claims may be written affirmatively.
- Weak claims must be hedged as possible/suggestive.
- Unsupported or contradicted claims must be removed.
- Not-assessable claims must be written as "not assessable from H&E ROI evidence".
- Do not downgrade malignancy to not-assessable when the diagnosis payload explicitly states benign, borderline, or malignant. In that case only grade, Weiss score, IHC, molecular, stage, margins, and other unavailable fields are not assessable.
- Do not invent IHC, molecular, stage, gross size, margin distance, or lymph-node count.
- The Diagnosis section must contain only the main diagnosis entity, not limitations, differential diagnoses, or qualifiers.
- Keep exactly these sections: <eight_report_headings>
Return only the rewritten report text.
2.3. ROI candidate ranking and initial selection
CONCH tile size, scoring, candidate pooling and initial VLM selection are specified in Methods, ROI ranking and initial selection. Positive prompts describe malignant tumour, invasive carcinoma, cancer cells, cellular atypia and high tumour cellularity, tumour necrosis, and invasion at a tissue interface. Negative prompts describe benign tissue, blank glass, adipose tissue without tumour, and poor-quality or out-of-focus tissue. These diagnostic prompts are separate from site-conditioned KEEP queries.
2.4. Domain-knowledge retrieval and diagnostic context
The query sequence and V-path routing are specified in Methods, Diagnostic candidates and selection. Disease and semantic-group entries are ranked by text-token overlap and site matching; candidate subtypes are ranked by frequency in the matching semantic groups. Disease names are matched by name, synonym and then token overlap to obtain definitions and child subtypes. Morphology descriptions are taken from semantic-group captions, prioritizing specimen-site matches. Retrieved associations are retained with diagnostic decisions.
2.5. Multi-slide acquisition
Candidate-selection rules, reportability checks and acquisition limits are illustrated in Supplementary Fig. 5 and specified in Methods, Reinspection and acquisition limits. The full public-case acquisition sequence appears in Supplementary Fig. 23.
2.6. Diagnosis-constrained writing and evidence associations
The diagnosis lock, report structure, retry rules and claim-assessment precedence are specified in Methods, Diagnosis-constrained report generation.
Writer-only region selection. The auxiliary selector excludes the diagnostic ROIs and reuses a matching cached selection when available. Otherwise it ranks the remaining candidates by their existing score plus keyword weights from ROI metadata. Grade, mitotic activity, necrosis and atypia terms receive bonuses, whereas background, artefact or normal-tissue terms incur a penalty. Selected regions retain their candidate images, coordinates, image levels and available metadata, without an additional segmentation step. Duplicate exclusion uses ROI identifiers or, when absent, coordinate-and-level keys; it does not require spatial non-overlap.
Evidence associations. An associated input image does not necessarily locate the evidence for a particular phrase. A tissue-fraction check can support tumour presence without identifying a histological subtype or architecture. A final automated “supported” status can coexist with a weak or conflicting segmentation subcheck, as illustrated in Fig. 4(d). The viewer retains these distinct levels of information for inspection (Supplementary Methods section 5).
3. Report comparisons, scoring and statistical analysis
The comparisons use the inputs and references described in Supplementary Methods section 2.1. Each comparison uses the stated cases with reports available from all compared methods; each metric includes only cases with the required reference information.
Prompt development and debugging used only the 456-case public development subset; the 1,200-case public evaluation cohort and private cohort were not used for prompt development. Reporting-policy comparisons use development cases; primary evaluation uses the public evaluation cohort and private cohort.
3.1. Comparator models and implementation
The benchmark includes general-purpose VLM baselines (Qwen + H&E, DeepSeek + H&E and GLM + H&E), medically pretrained MedGemma, PLIP-guided Qwen (a single-pass adaptation of PathAgent), PRISM2 and the PathXAI configurations (Supplementary Fig. 12(a) and Supplementary Methods section 2.2). Supplementary Table 5 summarizes their input conditions. Qwen + H&E, DeepSeek + H&E, GLM + H&E, MedGemma, PLIP-guided Qwen and PRISM2 received known anatomical site, as did PathXAI-Report. These comparisons assess reporting systems with shared access to anatomical context. HistGen and HistoGPT used their released image-feature pipelines.
Supplementary Table 5 Inputs and output scope of the report comparators. Known site is supplied as anatomical context where indicated. Model settings and native-model decoding are described in Supplementary Methods sections 3.1 and 3.2.
| Method | Image evidence | Additional context and output |
|---|---|---|
| Qwen + H&E; MedGemma | Selected H&E ROIs. | Known site; generated report. |
| DeepSeek + H&E; GLM + H&E | One to three fixed initial H&E ROIs, shared across these models; maximum image edge 768 pixels. | Known site; diagnostic call followed by report generation. |
| PLIP-guided Qwen | PLIP ranks and classifies three central 224-by-224-pixel crops from saved ROIs. | Crop descriptions and known site enter Qwen; single-pass report generation. |
| PRISM2 | One selected WSI per case, preferentially a diagnostic slide; WSI features computed by the released model. | Known site; one diagnostic line, without grade or morphology reporting. |
| HistGen | Features from all listed slides, concatenated per case. | No separate site prompt; native report decoder. |
| HistoGPT | Features from all listed slides, concatenated per case. | “Final diagnosis:” prompt without a separate site field; native report generation without GPT refinement. |
| PathXAI-Report (core) | H&E and segmentation overlays; diagnostic regions can be revisited or expanded. | Known site and tissue summaries at the stages specified in Methods; generated report. |
| PathXAI-Report | Core image evidence plus grade-focused H&E regions supplied only to writing. | Known site, tissue summaries, KEEP context and diagnosis-constrained writing. |
VLM deployment and image inputs
The deployed models include Qwen3.6-27B [14] in Q6_K GGUF format and MedGemma-1.5-4B-it [5] in BF16 GGUF format. The DeepSeek + H&E and GLM + H&E baselines use the deployment identifiers deepseek-v4.1-flash and glm-5-3-flash (described by the providers as DeepSeek-V4.1-Flash and GLM-5.3-Flash). Qwen and MedGemma inference used researcher-operated, self-hosted services; the GLM + H&E baseline used the ASTAR ARAC deployment. The public DeepSeek + H&E and GLM + H&E baselines use one to three H&E ROIs, converted to RGB JPEGs with maximum edge 768 pixels and quality 75. A diagnostic call precedes report generation; temperature is 0.2, the output limit is 16,384 tokens, and each task permits up to three attempts. Exact converted checkpoints and immutable remote-model revisions were not established for every evaluated report.
PLIP-guided Qwen
PLIP-guided Qwen uses PLIP image-text representations [17]. Crops are ranked by cosine similarity to a configured query, and top-ranked crops are classified against tissue and cell descriptions. The implementation uses central 224-by-224-pixel crops from the saved level-0 ROIs and retains three crops. Their descriptions and known site feed a single-pass Qwen report generator with temperature 0.15 and a maximum of 1,024 generated tokens. This differs from the original PathAgent's iterative WSI navigation, morphology perception and reasoning for visual question answering [7].
PRISM2
PRISM2 [4] contributes the diagnostic outputs collected in this study. Its prompt requests one diagnostic line, excluding grade, stage, differential diagnoses and explanatory text, with a maximum of 100 generated tokens.
3.2. HistGen and HistoGPT comparison
We additionally compared HistGen [2] and HistoGPT reports with PathXAI-Report (core) and the complete configuration using the same report-scoring protocol.
Model inputs and decoding
For each case, both implementations concatenate features from all listed slides in their input order before generating one report. HistGen uses 1,024-dimensional DINOv2-CPath features from non-overlapping 512-by-512-pixel level-0 tissue tiles, with FP32 inference. Decoding uses beam size 3, maximum length 100, region size 96 and 512 prototypes. HistoGPT uses fourfold slide downscaling and 256-pixel patches, resized to 224-by-224 pixels for its CTransPath encoder. A local implementation of its upstream sampler uses the prompt "Final diagnosis:", temperature 0.7, top-k 40, top-p 0.95 and maximum length 256, without GPT refinement. Both native-model runners use seed 42.
Training-overlap exclusion and shared public cases
HistGen patient splits are available from the authors' data release. To limit potential training overlap, we excluded every public case matching a patient in the training or validation arrays of either annotation.json or annotation712.update.json. Membership was determined from the top-level arrays; test-set membership alone did not exclude a case. The exact split used to train the released checkpoint is not independently established. Of 1,656 public cases, 1,340 were excluded by this rule and 316 remained eligible; 314 had reports available for HistGen and both PathXAI configurations, and 312 had reports from all four methods, including HistoGPT. HistoGPT was developed for dermatopathology, so comparisons on non-skin cases are out of domain.
Private-case comparison
Private reports were analysed separately against each pathologist's reference. The primary comparison comprised 151 cases shared by all reporting methods. A sensitivity analysis used all available reports from the 152-case cohort. Scoring and resampling follow Supplementary Methods sections 3.6 and 3.10.
3.3. Four-policy input comparison
Figures 3(b) to 3(d) and Supplementary Fig. 20 compare H&E alone, H&E with tissue statistics, H&E with segmentation overlays, and PathXAI-Report on the 456-case public development subset, defined by the intersection of the four input policies and the three writing configurations. The writing-policy comparison uses the same cases. Reports and references are matched by case and evaluated with the same metric-specific weighting rules (Supplementary Methods section 3.10). All 456 cases remain in the primary comparison, including 13 whose tissue-statistics context was marked unavailable in the pipeline metadata. A sensitivity analysis restricts all four policies to the same 443 cases marked available, preserving paired metric applicability and using 4,000 case-bootstrap draws for pointwise intervals (Supplementary Table 32). The three direct-input policies use known-site context without knowledge retrieval or re-inspection. PathXAI-Report adds knowledge-guided reasoning, evidence-driven reinspection and constrained writing to segmentation evidence.
The two input contrasts are tissue statistics minus H&E and segmentation overlays minus H&E. The two workflow contrasts are PathXAI-Report minus tissue statistics and PathXAI-Report minus segmentation overlays. The four transition counts in Fig. 3(d) describe paired cancer family match rate in the same shared public cases. They measure changes in diagnosis compatibility, not whole-report correctness.
3.4. Reporting-policy comparisons
Final report texts from eight configurations were assessed with the same scoring rules used for the public-cohort analysis (Supplementary Figs. 22(c) and 22(d); Supplementary Fig. 22). Three sets of comparisons address evidence organization, active evidence acquisition and writing constraints. Each uses cases with reports from every included configuration, comprising 42 for evidence organization, 432 for evidence acquisition and the same 456 development cases for writing constraints. After source-data exclusions, the archived evidence-organization comparison contained 45 cases with saved outputs from all three configurations. Three cases had dry-run placeholder text in at least one configuration, leaving 42 cases with generated reports. The acquisition comparison similarly retained 432 of 456 cases after excluding 24 with at least one placeholder; all 456 writing-comparison cases had reports. For each metric, applicable cases are determined by the available reference fields.
Supplementary Table 6 links each component comparison to its changed inputs or rules and corresponding results. The workflow contrasts are also shown in Supplementary Fig. 22(a). Comparisons that change several inputs or rules evaluate those changes together. Writer-only grade ROIs provide additional H&E regions for writing without entering the diagnostic branches. The final writing comparison also changes knowledge routing, invasion-state selection safeguards and diagnosis-constrained writing. Supplying these additional images differs from supplying tissue statistics only during writing.
Positive tissue-statistics input supplies the foreground fraction and retains neoplastic fractions of at least 5% and dead/necrotic fractions of at least 10% for up to eight ROIs. These fractions use all ROI mask pixels as the denominator. Other tissue classes and lower fractions are omitted from the supplied evidence. The prompt limits their use to tumour amount, substantial necrosis and ROI usability, without inferring subtype, grade or invasion. Conflict-triggered expansion uses at most two acquisition rounds and rolls back diagnoses that become generic or change tumour lineage; these rules apply throughout this comparison.
Supplementary Table 6 Report-component comparisons and their interpretation. All comparisons use development cases and known-site context. Within each comparison, the listed configurations share the stated cases; metric-specific eligibility depends on the reference fields. Each contrast is the first configuration minus the second.
| Component | Compared configurations | Changed inputs or rules | Cases and results |
|---|---|---|---|
| Direct tissue input | H&E + tissue statistics versus H&E alone; H&E + overlays versus H&E alone | Supplies numeric tissue summaries or segmentation overlays for direct reporting, without KEEP retrieval or reinspection. | 456; Fig. 3(b) |
| Complete workflow | PathXAI-Report versus direct tissue-statistics input; PathXAI-Report versus direct overlay input | Adds diagnostic review, reinspection and constrained writing to tissue evidence. These are comparisons of complete workflows. | 456; Figs. 3(b) and 3(c) |
| Evidence placement | Tissue statistics at writing only versus positive tissue statistics | Restricts tissue summaries to writing and removes the reference configuration's positive-only filter. Both placement and filtering change. | 42; Supplementary Fig. 22(b) |
| Candidate selection | Guarded dual-path reasoning versus positive tissue statistics | Adds two diagnostic candidates and guarded selection; also removes the positive-only tissue-summary filter. | 42; Supplementary Fig. 22(b) |
| Additional regions | Conflict-triggered expansion versus guarded dual-path reasoning | Adds up to two acquisition rounds when candidates conflict, with rollback of generic or changed-lineage diagnoses. | 432; Supplementary Fig. 22(c) |
| Zoom-enabled review | Zoom-enabled reinspection versus conflict-triggered expansion | Uses the reinspection policy with zooms and inherited tissue statistics. | 432; Supplementary Fig. 22(c) |
| Grade-focused images | Report-only grade evidence versus PathXAI-Report (core) | Adds auxiliary H&E regions to writing only; diagnostic candidates do not receive these regions. | 456; Supplementary Fig. 22(d) |
| Knowledge and diagnostic constraints | PathXAI-Report versus report-only grade evidence | Adds KEEP routing, invasion-state selection safeguards and diagnosis-locked writing. The comparison evaluates these changes together, including any resulting changes in acquired evidence. | 456; Supplementary Fig. 22(d) |
3.5. Evaluation measures and terminology
Supplementary Table 7 provides a guide to the primary and supporting measures, their preferred directions and their definitions. Automated reference agreement and pathologist ranking and correction assessment are distinct outcomes.
Supplementary Table 7 What the report evaluation measures. The five measures in Fig. 2 appear first, in the same order. Arrows indicate the preferred direction. Automated measures use only cases with applicable reference information; private references are evaluated separately. Methods and Supplementary Methods provide extraction rules, formulas, denominators and uncertainty estimates.
| Measure | What it asks | Details |
|---|---|---|
| Five measures shown in the automated report evaluation figure | ||
| Cancer family match rate ↑ | What fraction of diagnoses belong to the target cancer family? Public targets use TCGA labels; private targets use each pathologist's definite cancer diagnosis. Benign or unresolved private references are inapplicable. | Methods |
| Exact diagnosis match rate ↑ | What fraction of diagnoses match the specific entity or subtype in the case's reference report? Synonyms count as matches; related subtypes do not. A definite, specific reference diagnosis is required. | Methods |
| Finding F1 ↑ | How well does the report balance the correctness of its finding statements and recovery of documented reference findings? It combines precision and recall; matching presence and matching absence both count. Undocumented finding types are not scored. | Methods |
| Finding recall ↑ | What fraction of documented reference finding types is correctly reproduced as present or absent? Missing, uncertain, conflicting and opposite statements receive no credit. | Methods |
| Finding contradiction rate ↓ | Among documented finding types that the report definitely calls present or absent, what fraction disagrees with the reference? Undefined when none is addressed; interpreted alongside coverage because omissions are not contradictions. | Methods |
| Additional diagnostic, grade and coverage measures | ||
| Broad diagnostic agreement; malignancy agreement ↑ | Does the report match the reference's broad diagnostic category and malignancy status, respectively? | SI Methods |
| Diagnostic composite ↑ | What is the weighted agreement across broad diagnosis, specific diagnosis and malignancy? Weights are renormalized over applicable fields; grade is evaluated separately. In diagnostic composite (cohort target), TCGA cancer family match rate replaces the specific diagnosis component. | SI Methods |
| Balanced grade accuracy ↑ | How often does the grade match the reference when each represented grade is weighted equally? Correct fractions are calculated within grades and then averaged. Grading systems are evaluated separately. | Methods |
| Compatible grade coverage ↑ | Does the report supply a valid grade in the reference's grading system, irrespective of whether its value is correct? | SI Methods |
| Invasion agreement; necrosis agreement ↑ | Does the report agree with the reference on whether invasion or necrosis is present or absent? | SI Methods |
| Critical-positive recall ↑ | What fraction of critical findings documented as present is also reported as present? | SI Methods |
| Report field completeness ↑ | Which of the applicable broad diagnosis, specific diagnosis, malignancy, grade, invasion and necrosis fields have definite answers? Incorrect answers also count towards coverage. | Methods |
| Finding coverage ↑ | What fraction of documented reference finding types does the report definitely address as present or absent, whether correct or incorrect? | Methods |
| ROUGE-1 F1; ROUGE-2 F1 ↑ | How much unigram and bigram wording overlaps the narrative reference? | SI Methods |
| Pathologist ranking and correction assessment and supporting checks | ||
| Mean overall rank ↓ | Which complete report does each pathologist prefer? Rank 1 is best; ties are retained. | Methods |
| Correction ratings | Does the report require no, minor or major correction, or is it unusable? We report category proportions, no/minor ↑ and major/unusable ↓. | Methods |
| Concern flags ↓ | Did the pathologist flag an unsupported major claim or a major visible omission? These are reader-selected concerns. | Methods |
| No/minor correction with complete fields ↑; joint failure ↓ | Does the report need no or only minor correction, pass the output check and give definite answers for all applicable fields? Failing any requirement counts as joint failure. The original ratings remain unchanged. | Methods |
Study terminology and operational definitions
Supplementary Table 8 Study terminology and operational definitions.
| Term | Definition |
|---|---|
| System and modules | |
| PathXAI | The integrated study system, comprising PathXAI-Seg and PathXAI-Report. |
| Structured report with tissue evidence | A structured pathology report with diagnostic and descriptive sections and recorded associations to slide, ROI, tissue and contextual evidence. |
Continued on next page
Supplementary Table 8 (continued)
| Term | Definition |
|---|---|
| PathXAI-Seg | The tissue-segmentation module. It produces predicted tissue label maps, aligned segmentation overlays, and segmentation-derived tissue statistics. |
| PathXAI-Report | The complete report-generation module, including evidence acquisition, diagnostic reasoning, and structured report writing. |
| PathXAI-Report (core) | The report-module comparator with the core dual-path workflow. Relative to the complete configuration, it lacks KEEP retrieval and auxiliary grade-focused writer inputs and uses a different candidate-selection policy without diagnosis locking. |
| Segmentation outputs and evidence | |
| Predicted tissue label map | A categorical mask assigning a predicted tissue class to each pixel in a region of interest (ROI). |
| Segmentation overlay | The visual output formed by registering and displaying a predicted tissue label map over its corresponding H&E image. |
| Tissue statistics | Per-ROI summary of tissue fractions and the separately reported foreground fraction, calculated from the predicted tissue label map. |
| Tissue fractions (%) | For each non-background class, 100 times the predicted class-pixel count divided by all ROI mask pixels. Fractions are not renormalized over foreground. |
| Foreground fraction (%) | 100 times the non-background pixel count divided by all ROI mask pixels; reported separately from tissue fractions. |
| Tissue evidence | Segmentation-derived tissue label maps, aligned overlays and tissue statistics used to support diagnostic reasoning and reporting. |
| Image regions and acquisition | |
| Region of interest (ROI) | A selected image region used in report generation. Diagnostic ROIs can include aligned segmentation evidence; grade-focused writer ROIs supply H&E only and do not enter diagnostic reasoning. |
| Evidence acquisition / reinspection | Acquisition comprises initial ROI selection and reinspection. Reinspection digitally enlarges a current ROI or acquires a new region. Digital zoom retains the parent relationship without increasing optical sampling; new diagnostic ROIs receive region-specific segmentation. |
| Whole-slide image (WSI) | A digitized histology slide; model evidence is selected from regions of these slides. |
| Haematoxylin and eosin (H&E) | The histological stain used for the image inputs and visual evidence. |
| Evaluation cohorts and measures | |
| Public report evaluation | Cancer family match rate uses TCGA disease-family targets. Exact diagnosis match rate uses patient-specific reports, separately for the public development subset and public evaluation cohort. Finding and grade measures use their applicable references; ordinary scores weight cases equally. Reporting cases did not update model weights; the 456 development cases were used for prompt development. |
| Private report evaluation | Private cases evaluated separately against each pathologist's reference set for exact diagnosis match rate, using canonicalized subtype when available and otherwise primary diagnosis, including benign entities. Applicable cases are weighted equally for each reference set. |
| Balanced grade accuracy | Within each named grading system, exact grade recall averages cases equally within each reference grade, then weights the represented grades equally. Systems are reported separately; incompatible or missing predictions score as incorrect when the grade reference is applicable. |
| Report field completeness | Fraction of applicable fields with definite answers for broad diagnosis, specific diagnosis, malignancy, grade, invasion and necrosis. Incorrect answers and grades from incompatible systems also count towards coverage. |
| Compatible grade coverage | Fraction of applicable cases with a valid grade in the reference grading system, whether or not it agrees with the reference. |
| Reference entity availability | Fraction of references containing a definite, specific diagnostic entity. |
| Finding coverage | The proportion of documented binary reference findings with a comparable, explicit present/absent assertion; uncertainty, conflict and omission are not assertions. |
| Finding recall | The proportion of documented binary reference findings with an explicit assertion agreeing in polarity. Unrecorded findings do not count as negative references. |
| Finding contradiction rate | The proportion of comparable explicit binary assertions with polarity opposite to the reference (opposite/asserted, E/A). It is undefined when no comparable assertion is made and is reported with finding coverage and finding recall because it is conditional on output. |
| Finding F1 | Harmonic mean of reference-conditioned precision C/A and recall C/D, where D counts documented findings, A comparable assertions of those finding types and C polarity agreements. The direct formula gives zero when . Unrecorded finding types are outside this measure. |
| Segmentation internal / external evaluation | Internal tests use held-out samples from the training datasets. The six external test sets are excluded from study training; RINGS tumour and gland segmentation share images. Neither test set establishes patient disjointness or absence from foundation-model pretraining. |
| Pathologist reference-report authoring / ranking and correction assessment | Each pathologist authors one reference report per private case, forming reference sets P1 and P2. Ranking and correction assessment compares generated public-case reports by overall preference and correction requirements. Weixiang Zhong and Xiaoxi Wang performed both tasks. |
| Diagnostic composite | The study-defined normalized weighted agreement across broad diagnosis, specific diagnosis and malignancy. Diagnostic composite (cohort target) substitutes TCGA cancer family match rate for the specific diagnosis component. Both are distinct from cancer family match rate alone. |
3.6. Diagnostic extraction, targets and additional measures
The common extraction pipeline is described in Methods, Report text extraction; the primary measures are defined in Primary evaluation measures. The lexicon includes full names and abbreviations. For example, “conventional renal cell carcinoma”, “clear cell RCC” and “ccRCC” map to clear cell renal cell carcinoma; “invasive carcinoma of no special type” and “IDC” map to invasive ductal carcinoma. The machine-readable supplement evaluation_rules.json provides the study-specific terminology, organ-context and TCGA-family tables, matching rules and source checksums. The executable implementation is available in the code repository (Code availability).
Terminology and text normalization
Entity matching lowercases text, retains letters a–z and digits, and replaces other characters with spaces. Assertion status is evaluated for each disease mention using the punctuation-preserving text. Semicolons and contrasting clauses delimit local negation and uncertainty; differential-list qualifiers apply to subsequent alternatives until a new diagnostic assertion. Thus, “cannot exclude” is uncertain, and a negative morphological observation does not negate a separately stated diagnosis. Uncertainty in a separately named grade, stage or finding field does not invalidate an affirmed entity. Recognized diagnostic terms split across lines are rejoined. Limited spelling tolerance applies to section headings, without correcting disease words. Associated ductal carcinoma in situ can be retained as a component of an invasive breast diagnosis; unrelated affirmed entities remain conflicting.
Reference targets and applicability
Exact diagnosis match rate requires a definite, specific diagnosis in the patient's reference report. Private references use the structured subtype field, falling back to primary diagnosis only when the subtype field is empty; an explicitly unknown subtype is not replaced. Public targets for this measure come from the case report. TCGA cancer family match rate instead tests membership in the project's accepted disease family, allowing multiple entities for heterogeneous projects. The cohort label does not supply a missing patient-level subtype. Public broad-diagnosis and malignancy targets come from TCGA, while findings and grade come from the case report.
Among cases with an applicable reference diagnosis, we partitioned exact-diagnosis outcomes into matched diagnoses, definite non-specific diagnoses, definite different specific diagnoses and cases without a definite recognized diagnosis. The last group includes uncertain, conflicting, organ-incompatible, unrecognized and negated extractions. We separately counted definite specific predictions in cases without an applicable reference diagnosis (Source Data, diagnostic_outcomes). These extraction categories require case review to distinguish correct broader diagnoses, abstentions and clinically incorrect diagnoses.
Constant-diagnosis control. To quantify performance achievable with one fixed diagnosis, we considered the unique accepted entity names in the cancer-family table and selected the one maximizing family matches on the 456-case public development subset, resolving ties alphabetically. This selected squamous cell carcinoma. We then applied this diagnosis to every public evaluation case using the unchanged family-matching rules, without images or anatomical-site inputs. Paired differences compare each reporting method with this fixed control on the same cases, using 4,000 case-bootstrap draws conditional on the selected diagnosis (Supplementary Table 12).
Private cancer family match rate derives its target from each pathologist's frozen diagnosis extraction. An asserted reference must satisfy one of the existing invasive-breast carcinoma, prostate adenocarcinoma or colorectal adenocarcinoma family definitions. The same membership function then scores the generated diagnosis, including the rule that an in-situ diagnosis alone does not satisfy an invasive-breast target. Anatomical site alone does not establish a target. Benign, missing, uncertain or insufficiently specific references are inapplicable; missing, uncertain or incompatible generated diagnoses score zero on applicable references. The 151 shared private cases yield 121 applicable references for P1 and 123 for P2. The family definitions and extracted diagnoses are unchanged; this endpoint applies the family rules to the diagnoses in each pathologist's reference report.
Additional diagnostic measures
Broad diagnostic agreement. This is the percentage of applicable cases in which the generated diagnosis matches the reference's broad diagnostic category. Public targets come from TCGA labels, and private targets come from each pathologist's report. We divide the number of category matches by the number of cases with a definite reference category and multiply by 100. Missing, uncertain, conflicting or mismatched predictions receive no credit; cases without a definite reference category are excluded.
Malignancy agreement. This is the percentage of applicable cases in which the generated report matches the reference's malignancy status, classified as benign, borderline or malignant. Public targets come from TCGA labels, and private targets come from each pathologist's report. We divide the number of status matches by the number of cases with a definite reference status and multiply by 100. Missing, uncertain, conflicting or mismatched predictions receive no credit; cases without a definite reference status are excluded.
Diagnostic composite. This combines broad diagnostic agreement, exact diagnosis match rate and malignancy agreement into one case-level score, with weights of 0.35, 0.35 and 0.15, respectively. Weights are renormalized over reference-applicable fields. For case ,
where indicates reference applicability and is categorical agreement. A zero denominator makes the case inapplicable. We average applicable case scores and multiply by 100. When all three fields are applicable, the normalized weights are 7/17, 7/17 and 3/17, giving the two diagnostic levels equal weight and each more weight than malignancy. A sensitivity analysis assigns equal weight to each applicable component, retaining the same fields, case denominators and paired bootstrap draws (Supplementary Table 34).
Diagnostic composite (cohort target). This variant substitutes TCGA cancer family match rate for exact diagnosis match rate in the diagnostic composite. It uses the same component weights, renormalization and case-average calculation, and requires an applicable TCGA cancer-family target.
Sensitivity to diagnostic-section scope
An exploratory sensitivity analysis adds text under recognized Final Summary or Conclusion headings to diagnosis text before calculating exact diagnosis match rate and TCGA cancer family match rate (Supplementary Tables 35.1 to 35.2 and Supplementary Tables 36.1 to 36.2). It retains the same terminology, polarity rules, explicit subtype fields and reference targets. Reports without a recognized diagnosis section retain the primary fallback rule. The section parser is unchanged; an unrecognized heading does not end the preceding section. We analyse the public development subset and public evaluation cohort separately, retain the 151 shared private cases and compare reporting policies on the same 456 shared public cases. Paired changes use 4,000 shared case-bootstrap draws, restricted to applicable references for exact diagnosis match rate. Cancer family match rate uses all cases in each public cohort and the same disease-family membership rules, including the breast in-situ and lower-grade glioma overrides. Its pooled and source-specific analyses share cases; the reporting-policy set is also a subset of the public cohort.
3.7. Grade and structured-field coverage
Balanced grade accuracy and report field completeness are defined in Methods, Additional grade and coverage measures. The following grade measures use the same grade-extraction and reference-applicability rules. Diagnosis-only PRISM2 outputs have inapplicable content and grade metrics.
Case-average exact grade agreement. This is the percentage of applicable cases whose predicted grade exactly matches the reference grade. It uses the same grade-extraction and applicability rules as balanced grade accuracy, but weights cases equally. We divide the number of exact matches by the number of cases with an assessable reference grade and multiply by 100; missing or incompatible predictions contribute zero.
Compatible grade coverage. This measures whether a report supplies a valid grade from the reference grading system, regardless of whether the value matches. Each case with an assessable reference grade receives one if the generated grade is valid within that system and zero otherwise. Cases without an assessable reference grade are excluded. The reported percentage is 100 times the mean of these case-level indicators. A grade from another system can cover the structured field while failing compatible-grade coverage and exact agreement.
Conditional grade accuracy. This is the percentage of exact grade matches among reports supplying a definite grade in the reference grading system. Its denominator is the number of covered cases defined above; it is undefined when no case is covered. We report it alongside compatible grade coverage and balanced grade accuracy, separately for each grading system. Methods can answer different subsets of cases, so conditional accuracy alone does not provide a paired comparison. An always-Grade-2 control is additionally evaluated within the three-tier histological grading system.
Linear weighted grade . This measures ordinal agreement beyond that expected from the reference and predicted grade distributions, using only definite predictions in the reference grading system. With disagreement weights and the permitted grade limits and defined below, we calculate , where is the proportion of answered cases with reference grade and predicted grade , and the marginal proportions define expected disagreement. Grading systems are analysed separately. We use 4,000 bootstrap draws of answered case pairs and report percentile intervals over draws with defined ; the statistic is undefined with no compatible answers or zero expected disagreement. Source Data give the number of defined draws and results by cancer type or organ. Answering subsets differ between methods, so we report alongside coverage and overall accuracy.
Ordinal grade agreement. This gives partial credit according to how close the predicted grade is to the reference grade. For valid, compatible grades, the case score is ; a missing or incompatible prediction scores zero. Here and are the fixed permitted limits of the reference grading system, namely 1–3 for histological or nuclear grade, 1–4 for WHO or Fuhrman grade, 1–5 for ISUP grade group and 2–10 for Gleason score. Within each grading system, we average scores across cases with assessable reference grades and multiply by 100.
Grade macro-F1. This balances precision and recall for each represented reference-grade class, then gives each class equal weight. It averages over the set of represented reference grades, where , and are case counts of true-positive, false-positive and false-negative predictions for grade , and multiplies the result by 100. Grading systems are evaluated separately using cases with assessable reference grades. Missing or incompatible predictions contribute a false negative for the reference grade; predicted grades absent from the reference do not add classes to .
Confusion matrices and reference-defined control
Confusion matrices show raw counts and the number of cases in each reference-grade class. Missing and incompatible predictions appear outside the valid-grade cells; shading shows proportions within each reference-grade row. A reference-defined always-highest-grade control predicts the highest value in that system's range for every applicable case. Its balanced agreement is for represented reference classes when the highest class is represented, and zero otherwise. A single represented class cannot establish discrimination. The text examples accompanying Supplementary Fig. 12(c) illustrate diagnostic specificity and a non-high-grade reference.
3.8. Finding agreement, finding coverage and contradiction
The finding vocabulary comprises 20 binary concepts, namely invasion, necrosis, lymphovascular invasion, perineural invasion, metastasis, pleomorphism, mitoses, glandular architecture, papillary architecture, solid architecture, nested architecture, trabecular architecture, cribriform architecture, spindle cells, clear cytoplasm, hyperchromasia, prominent nucleoli, desmoplasia, inflammatory infiltrate and calcification. Case-insensitive, finding-specific regular expressions map recognized word forms and alternative expressions to these concepts. For example, “necrosis” and “necrotic” map to necrosis; “mitoses”, “mitotic figures” and “mitotic activity” map to mitoses; and “glandular”, “gland formation” and “gland forming” map to glandular architecture.
A negative statement about a specific subtype, extent or location does not establish absence of the broader finding. Unavailable invasion-depth or interface measurements are not evidence that invasion is absent. General tissue invasion is assessed separately from lymphovascular, perineural and capsular invasion; inflammatory-cell infiltration does not count as tumour invasion. General polarity rules are described in Methods, Report text extraction; missing-reference rules, case-level formulas and a worked example are given in Primary evaluation measures.
A prediction for an undocumented finding remains unscored. These measures assess agreement with extracted reference facts, not why a report omits a finding, whether every reference finding is visible in the evaluated tissue or whether an unrecorded claim is clinically false. Errors in the reference text or automated extraction can affect these scores. Finding-level measures remain distinct from structured report field completeness (Supplementary Methods section 3.7).
Contradictions per documented finding. To compare methods on a reference-defined denominator, we additionally calculate for all cases with , using the counts defined in Methods. This equals finding coverage minus finding recall. Cases with no comparable generated assertion contribute zero, so this measure is interpreted alongside coverage and recall. We report both the equal-case mean and the pooled fraction . A paired shared-finding analysis restricts each case to reference-documented types asserted by both compared methods, calculates their opposite-polarity fractions on those identical types and averages the difference across cases with at least one shared type. Intervals use 4,000 paired case-bootstrap resamples.
Fixed-polarity controls. We compare the generated reports with three controls that assert all 20 finding types as present, absent or the type-specific majority polarity in the 456-case development subset. The majority rule uses only documented development references, defaults to present for a tie and is fixed for the public evaluation and private cohorts. These controls use neither images nor case-specific reference information. They are scored with the same reference-applicability rules; assertions on undocumented types remain unscored. Reference polarity counts and results are given in Supplementary Tables 19 to 21.
Invasion agreement. This is the percentage of cases with definite reference invasion status in which the generated report agrees that invasion is present or absent. Missing, uncertain, conflicting or opposite predictions score zero; cases without a definite reference status are excluded. We average these case-level match indicators and multiply by 100.
Necrosis agreement. This uses the same case-level matching and aggregation rules as invasion agreement, applied to necrosis status. It includes only cases with definite reference necrosis status and gives no credit to missing, uncertain, conflicting or opposite predictions.
Critical-positive recall. This measures how many documented positive critical findings a report reproduces. For each case, we divide the number of correctly asserted positive findings among invasion, necrosis, lymphovascular invasion, perineural invasion and metastasis by the number documented as positive in the reference. Cases without a positive reference finding in this set are excluded. We average the applicable case scores and multiply by 100.
3.9. Wording-overlap measures
ROUGE-1 F1. This auxiliary measure quantifies single-word overlap with the narrative reference [54]. After text normalization, let and be the counts of word in the reference and prediction. The case score is , with zero when both counts are zero. Cases without a nonempty narrative reference and diagnosis-only outputs are inapplicable. We average applicable case scores and multiply by 100.
ROUGE-2 F1. This auxiliary measure quantifies overlap in consecutive word pairs (bigrams). It uses the ROUGE-1 F1 calculation with bigram counts in place of single-word counts, the same applicability rules and the same case-average percentage reporting.
3.10. Case weighting, confidence intervals and paired contrasts
Each public TCGA case represents one patient; private analyses retain the case as their sampling unit. Score aggregation for the report benchmark and reporting-policy comparisons used Python 3.9.6 and NumPy 2.0.2. The HistGen and HistoGPT comparisons used the same aggregation and resampling functions with Python 3.13.12 and NumPy 2.4.4. Case weighting, paired applicability, interval construction and reader clustering are defined in Methods, Report uncertainty and paired comparisons. Binary proportions used two-sided Clopper–Pearson limits. Balanced grade accuracy used the mean of the lower and upper binomial limits calculated separately for represented reference grades, each at confidence level . For ordinal grade agreement, the fixed grading-system limits define . Each case score satisfies . We computed Clopper–Pearson limits for all threshold proportions at confidence level and averaged their lower and upper bounds. This construction was applied to every ordinal grade estimate. Joint-reference binary means used the same approach across references, retaining the jointly applicable cases. Bonferroni adjustment within each mean gives at least 95% coverage under independent case sampling; independence between thresholds or references is not required. Absent reference-grade classes are not imputed. Interval calculations used SciPy 1.13.1.
For paired differences, percentile bootstrap intervals were reported when the observed differences varied across cases, or within at least one reference-grade class for balanced grade accuracy. When all resampled differences were constant, we retained the point estimate and marked the bootstrap interval as unavailable with . Reference-only availability differences have no model-comparison interval.
An exploratory multiplicity sensitivity covered PathXAI-Report versus every other comparator on the five main automated report measures: 32 comparisons on the 1,200 public evaluation cases, 10 on the 215 shared public cases for HistGen and HistoGPT, and 42 for each private reference set on the 151 shared cases. PRISM2 contributed only the two diagnostic measures. All 126 comparisons, including null and adverse differences, formed one Holm adjustment family. Two-sided exact McNemar tests used discordant pairs for cancer family match rate and exact diagnosis match rate. Two-sided paired tests used case-level differences for finding F1, finding recall and finding contradiction rate. The latter tests assume independent cases and use a approximation for the mean difference; sparse comparable assertions can limit this approximation. The analysis used SciPy 1.13.1 and retained the original jointly applicable cases. Source Data gives paired counts, nonzero differences, variance, and raw and adjusted values. This sensitivity does not adjust the original bootstrap intervals or the separate supplementary analyses.
An exploratory stratified bootstrap retained the same 126 comparisons and jointly applicable cases. We resampled paired differences within public TCGA cancer types or private organ groups, keeping each group's paired count fixed in 4,000 draws (seed 20261105). Each replicate averaged all sampled case differences equally; percentile limits therefore condition on the observed paired-applicable composition. Singleton and constant groups contributed their fixed observed totals; an interval was unavailable if no group had variation. P1 and P2 were analysed separately. These pointwise intervals describe case-level uncertainty within the recorded groups; hospital clustering was not estimated because a case-to-hospital mapping was unavailable. Subgroup means and counts are descriptive (Supplementary Results section 8).
The report-availability sensitivity used the full eligible cohorts, retaining reference-based applicability and assigning zero to unavailable outputs for cancer family match rate, exact diagnosis match rate, finding F1 and finding recall. We compared these estimates with shared-case and available-output analyses. Absolute binary proportions used Wilson score intervals; finding means and paired differences used the same case-bootstrap procedure. Finding contradiction rate requires definite assertions and was not imputed for unavailable outputs (Supplementary Results section 7).
All public report analyses excluded the same 51 cases whose supplied site descriptions contained disease names. Each comparison used the remaining eligible cases shared by its methods, with metric-specific applicability determined after this exclusion (Supplementary Table 16).
Each result table records metric-specific applicable denominators; separate P1 and P2 estimates use their corresponding reference fields. Human-rating checks and their paired denominators are specified in Supplementary Methods section 4.3.
4. Pathologist reference-report authoring and ranking and correction assessment
Research tools and data separation
The WSI service supplies image tiles; annotations and exports remain in the deployment environment. Reference reports, anonymous presentation assignments and analytic method decoding have separate roles. Restricted slides, credentials, reader-assignment keys and case-level study records are separated from software and aggregate results. Whether analysts were blinded to method identities during automatic scoring and statistical analysis could not be confirmed.
4.1. Pathologist reference-report authoring
The reference-authoring protocol, translation verification and timing are specified in Methods, Pathologist reference-report authoring. The two separately authored references per private case yield 304 reports for 152 cases. We also compare reference fields that are assessable in both reports.
The authoring workspace combines a WSI viewer, rectangular diagnostic ROI annotations, structured fields and free-text report sections (Supplementary Fig. 6). It displays a neutral study label and known site, retaining filenames, paths and diagnosis-derived cohort labels on the server. ROIs can be linked to a diagnostic purpose, coordinates and a free-text note. Structured fields cover primary diagnosis, broad tumour type, subtype, malignancy, invasion, grade, necrosis, confidence and unassessable findings. Narrative fields retain diagnosis, microscopic findings, evidence or rationale, limitations and final summary.
The interface supports drafts, recovery, submission locking and corrections with version history. The translation procedure uses temperature 0 and reuses translations of identical strings. The prompt contains field text without case identifiers or system-generated reports and requests preservation of diagnostic specificity, negation, uncertainty and numbers. Automatic checks flag changed numbers, untranslated text, lost question marks and potentially altered negation or uncertainty.
PathXAI Human Eval Independent review

① Slide navigation. Zoom, reset and full-screen controls inspect the H&E slide.
② ROI tools. The viewer supports drawing diagnostic regions for the reference.
③ Structured fields. Entered diagnosis facts are grouped into explicit fields.
Supplementary Figure 6 Pathologist reference-report authoring interface. Structured report fields and diagnostic ROI annotations accompany slide navigation. Draft, submission-lock and correction controls are shown; the slide viewport and thumbnail are omitted. The report is illustrative; the authoring protocol is in Supplementary Methods section 4.1. (Notation: WSI, whole-slide image; ROI, region of interest; “Independent review”, interface mode label.)
4.2. Pathologist ranking and correction assessment
Reader qualifications are given in Methods, Pathologist reference-report authoring. Cases were randomly sampled within cancer type. Randomized report presentation and re-review under anonymous method labels are described in Pathologist ranking and correction assessment. The 132 evaluable cases were drawn from the 456-case public development subset; corrupted source data were ineligible. PRISM2 was excluded from report ranking because it supplied diagnosis-only outputs. The interface retains separate overall, section-specific, correction and concern fields; the primary analysis uses the overall ranks, correction categories and concern flags described in Methods. If neither reader flagged a concern, resampling also yields zero counts; this does not establish that the underlying risk is absent.
Rating guidance
The interface instructed readers to inspect the WSI and assess each report on its own merits. No correction meant clinically acceptable as written; minor correction meant clinically usable after a limited edit; major correction required changes to the diagnosis or management-relevant content. Unusable ratings were left to each pathologist's judgment. Readers were instructed to select concern flags only when a major problem was present.
Agreement between readers
For each method, we measured exact agreement and linear weighted Cohen's across the ordered correction categories (none, minor, major and unusable). The disagreement weight was for categories indexed from 0 to 3. We also calculated Kendall's between the two readers' five-method preference rankings within each case, accounting for ties, and averaged the estimable case values. Cases in which either reader tied all five methods had undefined and were excluded only from this mean. Both analyses used 4,000 case-bootstrap replicates (seed 20260831), retaining both readers and all methods within each draw, with percentile 95% intervals. Results describe the two observed readers (Supplementary Table 29).
Supplementary Figure 7 shows the anonymous comparison controls.

① Anonymous candidates. A–E preserve randomized display labels without method identity.
② Acceptability and concerns. Blank rating controls and concern flags are shown; no new assessment.
③ Overall order. Ranking fields remain empty in this interface example.
Supplementary Figure 7 Report-ranking and correction interface with anonymous method labels. Anonymous method labels A–E accompany section-aligned reports and ranking, correction and concern controls. Prior ratings remained visible during re-review. Procedures are in Supplementary Methods section 4.2.
4.3. Output and structured-field checks
The output-failure screen and no/minor correction with complete fields measure are defined in Methods, Report-content checks. An abstention fails the field-completeness check even when clinically appropriate. Supplementary Figure 19(b) and Supplementary Table 28 retain the original rating categories and the cumulative checks. Each report's check results are paired with its original ratings; no case or reader rating is removed by these screens.
5. Evidence-linked report viewer
The Result, Evidence, Reasoning and Verification views show selected report fields, spatial inputs, acquisition steps and automated claim assessments from one randomly selected public case. Identifiers are replaced by neutral labels;
callouts and clarified interface labels are added. Evaluation references and ratings are omitted. Interface usability and review time were not formally evaluated.

1 Evidence chips. Open corresponding slides, ROIs or report claims.
2 ROI card. Shows the selected parent region and its tissue fractions.
3 Zoom card. Links the enlarged view to its parent ROI.
4 Related chips. Navigate from a report claim to its supporting evidence.
Supplementary Figure 8 Result view of the report viewer. The generated report links to slide regions, H&E images, segmentation overlays and tissue statistics. The inspector displays a linked necrosis statement and its automated assessment. Links follow the associations stored in the evidence graph. (Notation: H&E, haematoxylin and eosin.)
(a) Evidence tab
| Result | Evidence | Reasoning | Verification |

Slide locations. Numbered figure chips link to saved positions on each slide.
ROI pair. The saved H&E crop sits beside its segmentation overlay.
Tissue fractions. Bars report the saved class percentages for ROI 3.
Supplementary Figure 9 Evidence view of the report viewer. (a) links indexed slide regions to H&E images, segmentation overlays and tissue statistics for the case in Supplementary Fig. 8. The selected tissue statistics also appear in the necrosis assessment in Supplementary Fig. 11. (Notation: ROI, region of interest; H&E, haematoxylin and eosin. Interface colours differ from the shared main-figure palette.)
(a) Reasoning tab
| Result | Evidence | Reasoning | Verification |
|---|---|---|---|
| ① ReinspectionEvidence reassessmentACTION reinspectionREASON missing evidenceinspect raw step | |||
| ② Structured fields and claim assessmentStructured fields and claim assessmentOUTPUT 12 claims checkedinspect raw step Open claims | |||
| ③ Report generationReport generationinspect raw step | |||
DECISION STEP
Evidence reassessment
▼ Source details
| Evidence sufficient for diagnosis: No | Diagnostic confidence: low |
|---|---|
| Additional image evidence needed• High-power magnification to assess nuclear atypia and mitotic figures (critical for Weiss criteria)• Evidence of capsular or vascular invasion (requires scanning the tumor capsule and adjacent vessels)• Clear visualization of necrosis (current views are ambiguous or obscured by artifacts)• Assessment of tumor cell heterogeneity and lipid content | |
| Additional clinical information needed• Immunohistochemistry (IHC) results (e.g., Inhibin-alpha, Melan-A, SF-1, Synaptophysin)• Clinical history (e.g., hormonal activity, tumor size)• Radiological correlation | |
① Reinspection step. Shows the acquisition action and its stated reason.
② Claim check. Shows the number of report claims checked by the system.
③ Source details. Lists additional image evidence and clinical information needed.
Supplementary Figure 10 Reasoning view of the report viewer. (a) shows reinspection, claim checks and report-generation steps. The expanded inspector records model assessments of evidence sufficiency and diagnostic confidence, together with missing image or clinical information.
(a) Verification tab
| Result | Evidence | Reasoning | Verification | ||
|---|---|---|---|---|---|
| Evidence Support Map | |||||
| CLAIM | STATUS | FIELD | STATEMENT | ||
| C002 | weak | primary_diagnosis | adrenocortical carcinomaThe combination of the known adrenal site, high-grade cytology (pleomorphism, prominent nucleoli), and extensive necrosis is highly suggestive of adrenocortica... | ||
| C007 | supported | necrosis | present, extensive geographic necrosisSegmentation data shows a 'Dead' tissue fraction of 70.2% in ROI 63323 and 45.6% in ROI 78745, confirming extensive necrosis. | ||
| C011 | supported | cytology | large polygonal cells with abundant eosinophilic to clear vacuolated cytoplasm, marked nuclear pleomorphism, and prominent nucleoliHigh-power views (ROI 92332) show large polygonal cells with eosinophilic cytoplasm, marked nuclear pleomorphism, and prominent nucleoli. | ||
| CLAIM ASSESSMENT | |||||
| C007: necrosisstatus: supported | |||||
| Summary | |||||
| present, extensive geographic necrosis | |||||
| ▶ Source details | |||||
| Related | |||||
| Figure 2 | Figure 3 | Figure 4 | Figure 5 | Figure 6 | Segmentation |
1 Support map. Pairs report claims with their computational support status.
2 Evidence chips. Opens the corresponding report figures or segmentation outputs.
3 Claim inspector. Shows the necrosis claim and its supporting evidence links.
Supplementary Figure 11 Verification view of the report viewer. (a) shows selected diagnosis, necrosis and cytology claims with their automated support states and evidence links. The expanded necrosis inspector connects to the tissue evidence in Supplementary Fig. 9. The diagnosis retains its weaker support state; intervening rows are omitted for print. (Notation: C-prefixed codes, viewer-local claim identifiers; supported/weak, automated assessment labels.)
Supplementary Results
Tables report pointwise 95% confidence intervals and sample sizes for each metric. Source Data provide full-precision estimates. Rates and Dice are percentages, paired differences are expressed in pp, and preference rank uses its 1–5 scale. NA denotes unavailable or inapplicable values. Metric definitions and weighting are given in Supplementary Table 7.
Arrows indicate whether higher or lower metric values are preferred. Paired differences subtract the comparator method's score from the target method's score.
The private-cohort tables report aggregate results, not case-level clinical reports or ratings. The private dataset is not publicly available; private-case images are not included as illustrative examples. Selected de-identified textual comparisons do not release the underlying reports or case-level evaluation files.
1. Automated report evaluation on the public cohort
Primary evaluation-cohort estimates are given in Supplementary Tables 9 to 11.
Supplementary Table 9 Primary public report evaluation on 1,200 cases (Fig. 2(b)). Percentages with pointwise 95% confidence intervals and applicable case counts. Finding contradiction rate uses method-specific comparable assertions. Interval construction follows Supplementary Methods section 3.10.
| Method | Cancer family match rate | Exact diagnosis match rate | Finding F1 | Finding recall | Finding contradiction rate |
|---|---|---|---|---|---|
| Qwen + H&E | 68.1[65.36, 70.72] | 58.9[54.90, 62.89] | 43.0[40.63, 45.42] | 36.6[34.34, 38.88] | 16.0[13.72, 18.42] |
| n=1200 | n=604 | n=997 | n=997 | n=707 | |
| DeepSeek + H&E | 71.9[69.28, 74.44] | 60.3[56.24, 64.19] | 42.1[39.82, 44.43] | 36.1[33.98, 38.40] | 23.2[20.57, 25.84] |
| n=1200 | n=604 | n=997 | n=997 | n=738 | |
| GLM + H&E | 61.8[59.02, 64.59] | 56.0[51.90, 59.96] | 44.2[41.85, 46.47] | 38.1[35.86, 40.42] | 22.5[19.96, 25.22] |
| n=1200 | n=604 | n=997 | n=997 | n=751 | |
| MedGemma | 6.7[5.32, 8.23] | 6.1[4.35, 8.35] | 37.4[35.12, 39.70] | 31.8[29.54, 33.92] | 14.4[11.90, 17.02] |
| n=1200 | n=604 | n=997 | n=997 | n=610 | |
| PLIP-guided Qwen | 45.7[42.82, 48.53] | 39.2[35.32, 43.26] | 21.9[19.84, 24.04] | 17.8[15.97, 19.65] | 6.3[3.99, 8.83] |
| n=1200 | n=604 | n=997 | n=997 | n=351 | |
| PRISM2 | 53.2[50.38, 56.10] | 52.6[48.58, 56.69] | NA | NA | NA |
| n=1200 | n=604 | ||||
| PathXAI-Report (core) | 68.2[65.45, 70.80] | 58.1[54.06, 62.08] | 46.7[44.35, 49.01] | 39.4[37.24, 41.62] | 9.8[7.96, 11.77] |
| n=1200 | n=604 | n=997 | n=997 | n=723 | |
| PathXAI-Report | 72.5[69.88, 75.01] | 62.3[58.25, 66.13] | 48.8[46.45, 51.10] | 41.6[39.31, 43.93] | 11.5[9.64, 13.52] |
| n=1200 | n=604 | n=997 | n=997 | n=759 |
Supplementary Table 10 HistGen and HistoGPT comparison on 215 shared cases from the public evaluation cohort. Released HistGen training and validation patients are excluded. Percentages with unadjusted 95% case-bootstrap intervals and applicable case counts. Finding contradiction rate uses method-specific comparable assertions.
| Method | Cancer family match rate | Exact diagnosis match rate | Finding F1 | Finding recall | Finding contradiction rate |
|---|---|---|---|---|---|
| HistGen | 39.1[32.51, 45.94] | 42.5[30.97, 54.59] | 17.2[13.13, 21.54] | 13.6[10.12, 17.33] | 32.2[22.97, 41.67] |
| n=215 | n=73 | n=173 | n=173 | n=74 | |
| HistoGPT | 5.1[2.58, 8.97] | 1.4[0.03, 7.40] | 12.0[8.43, 15.73] | 8.8[6.15, 11.84] | 9.3[2.33, 18.60] |
| n=215 | n=73 | n=173 | n=173 | n=43 | |
| PathXAI-Report (core) | 73.5[67.06, 79.26] | 58.9[46.77, 70.29] | 43.2[38.01, 48.50] | 35.8[31.06, 40.86] | 12.5[8.13, 17.66] |
| n=215 | n=73 | n=173 | n=173 | n=126 | |
| PathXAI-Report | 77.7[71.51, 83.06] | 63.0[50.91, 74.03] | 43.3[38.01, 48.68] | 36.0[31.12, 41.04] | 12.7[8.12, 17.87] |
| n=215 | n=73 | n=173 | n=173 | n=127 |
Supplementary Table 11 Paired differences on the public evaluation cohort. Each estimate is PathXAI-Report minus the listed comparator, in percentage points, with an unadjusted 95% case-bootstrap interval. Applicable counts refer to cases assessable in both methods.
| Method | Cancer family match rate | Exact diagnosis match rate | Finding F1 | Finding recall | Finding contradiction rate |
|---|---|---|---|---|---|
| Qwen + H&E | +4.42[1.92, 6.75] | +3.31[0.00, 6.62] | +5.75[3.63, 7.87] | +5.07[3.04, 7.03] | -5.52[-8.02, -3.11] |
| DeepSeek + H&E | n=1200+0.58[-1.92, 3.17] | n=604+1.99[-1.82, 5.79] | n=997+6.67[4.29, 9.27] | n=997+5.49[3.11, 7.78] | n=664-9.19[-12.11, -6.17] |
| GLM + H&E | n=1200+10.67[7.42, 13.75] | n=604+6.29[2.15, 10.60] | n=997+4.60[1.89, 7.15] | n=997+3.50[1.06, 5.96] | n=634-10.01[-13.07, -7.04] |
| MedGemma | n=1200+65.83[63.17, 68.42] | n=604+56.13[52.15, 60.10] | n=997+11.33[8.75, 13.89] | n=997+9.86[7.46, 12.35] | n=644-1.08[-3.97, 1.75] |
| PLIP-guided Qwen | n=1200+26.83[24.08, 29.50] | n=604+23.01[19.21, 26.66] | n=997+26.88[24.32, 29.34] | n=997+23.87[21.53, 26.14] | n=546+4.75[1.92, 7.43] |
| PRISM2 | n=1200+19.25[15.50, 22.84] | n=604+9.60[4.47, 14.74] | NA | NA | NA |
| PathXAI-Report (core) | +4.33[2.08, 6.58]n=1200 | +4.14[1.49, 6.79]n=604 | +2.07[0.29, 3.88]n=997 | +2.24[0.46, 4.01]n=997 | +1.38[-0.34, 3.11]n=686 |
Constant-diagnosis control
Always predicting squamous cell carcinoma, selected on the development subset, gave a cancer family match rate of 32.8% in the public evaluation cohort, compared with 72.5% for PathXAI-Report. The paired difference was 39.75 pp (Supplementary Table 12).
Supplementary Table 12 Cancer family match rate with a constant-diagnosis control. The control always predicts squamous cell carcinoma, selected using only the 456-case public development subset and then fixed for all 1,200 public evaluation cases. The same cancer-family rules score controls and generated diagnoses. Differences subtract the control from each method in the evaluation cohort; brackets give unadjusted 95% paired-case bootstrap intervals. No images or anatomical-site inputs determine the constant diagnosis. Development results are descriptive in-sample values.
| Method | Development match rate (%) | Evaluation match rate (%) | Evaluation difference (pp) [95% CI] |
|---|---|---|---|
| Constant diagnosis | 14.9 | 32.8 | — |
| Qwen + H&E | 71.5 | 68.1 | +35.33 [+32.17, +38.50] |
| DeepSeek + H&E | 70.6 | 71.9 | +39.17 [+36.17, +42.17] |
| GLM + H&E | 55.9 | 61.8 | +29.08 [+25.67, +32.42] |
| MedGemma | 7.7 | 6.7 | -26.08 [-29.00, -22.92] |
| PLIP-guided Qwen | 29.8 | 45.7 | +12.92 [+9.33, +16.58] |
| PRISM2 | 55.9 | 53.2 | +20.50 [+16.75, +24.25] |
| PathXAI-Report (core) | 73.7 | 68.2 | +35.42 [+32.25, +38.50] |
| PathXAI-Report | 76.8 | 72.5 | +39.75 [+36.42, +43.00] |
Supplementary Figure 12 summarizes the 1,656-case public comparison. Supplementary Tables 13.1 to 13.7 give complete estimates, including reference-specific grading systems, ordinal grade agreement, compatible grade coverage and critical-positive recall.
1.1. Diagnostic specificity and grading
PathXAI-Report achieves a higher exact diagnosis match rate in both public reference subsets. Exact diagnosis match rate requires a match to the specific diagnosis in each reference report. The combined public estimate averages the case-level scores across 956 applicable cases, comprising 352 in the public development subset and 604 in the public evaluation cohort. Each applicable case receives equal weight, and 95% intervals use 4,000 case-bootstrap resamples with the same procedure as the other public outcomes. The public development subset overlapped prompt development, whereas the public evaluation cohort was not used for prompt development (Supplementary Methods section 3.4). With the primary extraction rule, PathXAI-Report had the highest exact diagnosis match rate against case-specific public references, reaching 66.19% in 352 applicable cases in the public development subset and 62.25% in 604 in the public evaluation cohort, compared with 61.65% and 58.94% for Qwen + H&E (Supplementary Table 35.1). The selected renal case TCGA-B0-5080 illustrates the cancer-family comparison. PathXAI-Report named clear cell renal cell carcinoma, matching the cohort target, whereas Qwen + H&E reported a renal neoplasm not otherwise specified (Supplementary Fig. 12(e)). Sensitivity to including final-summary diagnoses is assessed in Supplementary Results section 5.
On the 604 applicable public evaluation cases, the diagnosis-outcome counts for PathXAI-Report versus Qwen + H&E were 376 versus 356 matches, 67 versus 97 definite non-specific diagnoses, 149 versus 128 different specific diagnoses and 12 versus 23 cases without a definite recognized diagnosis. Thus, more matching diagnoses coexisted with more different specific diagnoses. Among the remaining 596 cases without an applicable reference diagnosis, specific predictions occurred in 474 and 402 cases, respectively; their exact agreement could not be assessed. Complete counts for all methods and cohorts are provided in Source Data (diagnostic_outcomes).
Histological-grade (1–3) agreement exceeds Qwen + H&E and an always-Grade-3 control. Balanced grade accuracy gives each reference-grade class equal weight, so frequent grades do not dominate the score. Histological-grade (1–3) agreement was 38.18% (95% CI, 32.98–45.34; n=671), compared with 22.63% for Qwen + H&E, 33.3% for the always-Grade-3 control and 39.15% for DeepSeek + H&E (Supplementary Fig. 12(c)). The textual example TCGA-2H-A9GM contrasts moderate with high-grade wording. The reference describes moderately differentiated adenocarcinoma arising in Barrett's epithelium; PathXAI-Report gives moderate differentiation and PLIP-guided Qwen high grade. For other public grading systems, agreement was 0% for Fuhrman (n=107) and nuclear grade (n=21), and 14.1% for WHO grade (n=25; Supplementary Table 13.5).
Supplementary Table 13.1 Combined public report evaluation (Supplementary Fig. 12), 1,656 cases. General-purpose VLMs + H&E. Equal-case estimates (%) with pointwise 95% confidence intervals; each cell includes metric-applicable n. Diagnosis-only PRISM2 is not scored for report content. PLIP-guided Qwen denotes the single-pass adaptation.
| Metric | Qwen + H&E | DeepSeek + H&E | GLM + H&E |
|---|---|---|---|
| Diagnostic composite (cohort target) | 84.1 [82.9, 85.2]n=1656 | 83.9 [82.8, 85.2]n=1656 | 73.2 [71.5, 74.8]n=1656 |
| Cancer family match rate | 69.0 [66.7, 71.2]n=1656 | 71.6 [69.3, 73.7]n=1656 | 60.2 [57.8, 62.6]n=1656 |
| Broad diagnostic agreement | 96.7 [95.7, 97.5]n=1656 | 94.4 [93.2, 95.4]n=1656 | 83.4 [81.5, 85.2]n=1656 |
| Malignancy agreement | 90.0 [88.4, 91.4]n=1656 | 88.4 [86.8, 89.9]n=1656 | 79.5 [77.4, 81.4]n=1656 |
| Invasion agreement | 69.7 [66.6, 72.7]n=894 | 59.4 [56.1, 62.6]n=894 | 61.9 [58.6, 65.1]n=894 |
| Necrosis agreement | 46.2 [41.4, 51.1]n=424 | 46.0 [41.2, 50.9]n=424 | 37.0 [32.4, 41.8]n=424 |
| Compatible grade coverage | 34.9 [31.7, 38.3]n=827 | 65.8 [62.4, 69.0]n=827 | 59.0 [55.6, 62.4]n=827 |
| Reference entity availability | 57.7 [55.3, 60.1]n=1656 | 57.7 [55.3, 60.1]n=1656 | 57.7 [55.3, 60.1]n=1656 |
| Report field completeness | 84.4 [83.5, 85.3]n=1656 | 85.3 [84.2, 86.3]n=1656 | 80.5 [79.2, 81.7]n=1656 |
| Finding F1 | 42.3 [40.4, 44.3]n=1405 | 39.7 [37.8, 41.8]n=1405 | 43.2 [41.3, 45.1]n=1405 |
| Critical-positive recall | 44.8 [42.3, 47.1]n=1174 | 40.2 [37.8, 42.6]n=1174 | 42.6 [40.0, 44.9]n=1174 |
| Finding coverage (A/D) | 42.5 [40.6, 44.3]n=1405 | 44.8 [42.8, 46.7]n=1405 | 48.0 [46.1, 49.9]n=1405 |
| Finding recall (C/D) | 35.7 [33.9, 37.6]n=1405 | 33.8 [32.1, 35.6]n=1405 | 37.1 [35.3, 39.0]n=1405 |
| Finding contradiction rate (E/A) | 17.0 [15.0, 19.0]n=1004 | 24.1 [21.8, 26.5]n=1006 | 23.1 [20.9, 25.3]n=1053 |
| ROUGE-1 F1 | 21.5 [21.1, 21.9]n=1656 | 20.3 [19.9, 20.6]n=1656 | 20.7 [20.3, 21.0]n=1656 |
| ROUGE-2 F1 | 4.5 [4.3, 4.7]n=1656 | 4.1 [3.9, 4.3]n=1656 | 3.6 [3.5, 3.8]n=1656 |
Supplementary Table 13.2 Combined public report evaluation (Supplementary Fig. 12), 1,656 cases. Medical and pathology models. Equal-case estimates (%) with pointwise 95% confidence intervals; each cell includes metric-applicable n. Diagnosis-only PRISM2 is not scored for report content. PLIP-guided Qwen denotes the single-pass adaptation.
| Metric | MedGemma | PLIP-guided Qwen | PRISM2 |
|---|---|---|---|
| Diagnostic composite (cohort target) | 41.9 [40.5, 43.5]n=1656 | 70.7 [69.3, 72.1]n=1656 | 74.9 [73.5, 76.4]n=1656 |
| Cancer family match rate | 6.9 [5.8, 8.3]n=1656 | 41.3 [38.9, 43.7]n=1656 | 54.0 [51.5, 56.4]n=1656 |
| Broad diagnostic agreement | 66.3 [64.0, 68.6]n=1656 | 89.7 [88.1, 91.1]n=1656 | 90.5 [89.0, 91.9]n=1656 |
Continued on next page
Supplementary Table 13.2 (continued)
| Metric | MedGemma | PLIP-guided Qwen | PRISM2 |
|---|---|---|---|
| Malignancy agreement | 66.8 [64.5, 69.1]n=1656 | 95.0 [93.8, 96.0]n=1656 | 87.4 [85.7, 89.0]n=1656 |
| Invasion agreement | 56.9 [53.6, 60.2]n=894 | 22.3 [19.6, 25.1]n=894 | NA |
| Necrosis agreement | 54.5 [49.6, 59.3]n=424 | 14.4 [11.2, 18.1]n=424 | NA |
| Compatible grade coverage | 46.4 [43.0, 49.9]n=827 | 78.1 [75.1, 80.9]n=827 | NA |
| Reference entity availability | 57.7 [55.3, 60.1]n=1656 | 57.7 [55.3, 60.1]n=1656 | 57.7 [55.3, 60.1]n=1656 |
| Report field completeness | 67.7 [66.0, 69.4]n=1656 | 81.8 [80.7, 82.8]n=1656 | NA |
| Finding F1 | 35.6 [33.6, 37.5]n=1405 | 20.1 [18.5, 21.8]n=1405 | NA |
| Critical-positive recall | 41.5 [39.1, 44.0]n=1174 | 16.1 [14.3, 18.0]n=1174 | NA |
| Finding coverage (A/D) | 35.3 [33.4, 37.2]n=1405 | 17.1 [15.6, 18.7]n=1405 | NA |
| Finding recall (C/D) | 29.9 [28.0, 31.8]n=1405 | 16.1 [14.7, 17.6]n=1405 | NA |
| Finding contradiction rate(E/A) | 15.3 [13.1, 17.6]n=839 | 7.2 [5.1, 9.4]n=472 | NA |
| ROUGE-1 F1 | 16.8 [16.3, 17.2]n=1656 | 11.8 [11.5, 12.0]n=1656 | NA |
| ROUGE-2 F1 | 3.8 [3.6, 4.1]n=1656 | 1.7 [1.6, 1.8]n=1656 | NA |
Supplementary Table 13.3 Combined public report evaluation (Supplementary Fig. 12), 1,656 cases. PathXAI. Equal-case estimates (%) with pointwise 95% confidence intervals; each cell includes metric-applicable n. Diagnosis-only PRISM2 is not scored for report content. PLIP-guided Qwen denotes the single-pass adaptation.
| Metric | PathXAI-Report (core) | PathXAI-Report |
|---|---|---|
| Diagnostic composite(cohort target) | 84.4 [83.3, 85.5]n=1656 | 86.6 [85.7, 87.6]n=1656 |
| Cancer family match rate | 69.7 [67.4, 71.9]n=1656 | 73.7 [71.5, 75.8]n=1656 |
| Broad diagnostic agreement | 96.3 [95.2, 97.1]n=1656 | 97.6 [96.8, 98.3]n=1656 |
| Malignancy agreement | 90.8 [89.3, 92.2]n=1656 | 91.2 [89.7, 92.5]n=1656 |
| Invasion agreement | 70.7 [67.6, 73.7]n=894 | 77.4 [74.5, 80.1]n=894 |
| Necrosis agreement | 69.8 [65.2, 74.1]n=424 | 67.9 [63.3, 72.3]n=424 |
| Compatible grade coverage | 45.6 [42.2, 49.1]n=827 | 62.6 [59.2, 65.9]n=827 |
| Reference entity availability | 57.7 [55.3, 60.1]n=1656 | 57.7 [55.3, 60.1]n=1656 |
| Report field completeness | 86.6 [85.8, 87.5]n=1656 | 90.4 [89.6, 91.1]n=1656 |
| Finding F1 | 45.2 [43.2, 47.2]n=1405 | 47.8 [45.9, 49.8]n=1405 |
| Critical-positive recall | 50.6 [48.3, 53.0]n=1174 | 54.3 [52.0, 56.5]n=1174 |
| Finding coverage (A/D) | 42.9 [41.1, 44.8]n=1405 | 46.6 [44.6, 48.4]n=1405 |
| Finding recall (C/D) | 37.9 [36.0, 39.7]n=1405 | 40.5 [38.6, 42.4]n=1405 |
| Finding contradiction rate(E/A) | 11.1 [9.4, 12.8]n=1006 | 12.7 [11.0, 14.5]n=1070 |
| ROUGE-1 F1 | 22.1 [21.7, 22.4]n=1656 | 22.0 [21.6, 22.3]n=1656 |
| ROUGE-2 F1 | 4.6 [4.4, 4.8]n=1656 | 4.6 [4.4, 4.8]n=1656 |
(a) Report systems and output scope
| General-purpose VLMs + H&E | Medical and pathology models | PathXAI-Report | |||
|---|---|---|---|---|---|
| ■ Qwen + H&E | Report | ■ MedGemma | Report | ■ PathXAI-Report (core) | Report |
| ■ DeepSeek + H&E | Report | ■ PLIP-guided Qwen | Report | ■ PathXAI-Report | Report |
| ■ GLM + H&E | Report | ■ PRISM2 | Diagnosis only | ||
(b) Cancer family match rate and paired gains
| Cancer family match rate ↑ | 1,656 casesCase average · % [95% CI] |
|---|---|
| Qwen + H&E | 69.0 [66.7–71.2] |
| DeepSeek + H&E | 71.6 [69.3–73.7] |
| GLM + H&E | 60.2 [57.8–62.6] |
| MedGemma | 6.9 [5.8–8.3] |
| PLIP-guided Qwen | 41.3 [38.9–43.7] |
| PRISM2 | 54.0 [51.5–56.4] |
| PathXAI-Report (core) | 69.7 [67.4–71.9] |
| PathXAI-Report | 73.7 [71.5–75.8] |

(c) Balanced grade accuracy and prediction distributions
| Balanced grade accuracy ↑ | |
|---|---|
| Histological grades 1–3 · n = 671Equal reference-grade weighting | |
| Qwen + H&E | 22.6 |
| DeepSeek + H&E | 39.1 |
| GLM + H&E | 35.8 |
| MedGemma | 19.8 |
| PLIP-guided Qwen | 31.8 |
| PathXAI-Report (core) | 29.4 |
| PathXAI-Report | 38.2 |
Dashed: always grade 3 (33.3%)

Reference grades 1 / 2 / 3: 73 / 266 / 332
| Ref. | 1 | 2 | 3 | Unstated / other | |
|---|---|---|---|---|---|
| 1 | 1 | 25 | 15 | 32 | |
| 2 | 1 | 156 | 53 | 56 | |
| 3 | 2 | 76 | 181 | 73 | |
Predicted grade
PathXAI-Report
(d) Finding assertion, coverage and contradiction outcomes
| Finding F1 ↑ | Finding recall ↑ | Finding coverage ↑ | Finding contradiction rate ↓ | |||||
|---|---|---|---|---|---|---|---|---|
| n = 1,405 assessable cases | n = 1,405 assessable cases | n = 1,405 assessable cases | Explicit assertions only | |||||
| Qwen + H&E | 42.3 | 35.7 | 42.5 | 17.0 | ||||
| DeepSeek + H&E | 39.7 | 33.8 | 44.8 | 24.1 | ||||
| GLM + H&E | 43.2 | 37.1 | 48.0 | 23.1 | ||||
| MedGemma | 35.6 | 29.9 | 35.3 | 15.3 | ||||
| PLIP-guided Qwen | 20.1 | 16.1 | 17.1 | 7.2 | ||||
| PRISM2 | NA | NA | NA | NA | ||||
| PathXAI-Report (core) | 45.2 | 37.9 | 42.9 | 11.1 | ||||
| PathXAI-Report | 47.8 | 40.5 | 46.6 | 12.7 | ||||
(e) Selected examples of diagnostic specificity and grade
Cancer family match rate · TCGA-B0-5080
TCGA target: clear cell renal cell carcinoma
Qwen + H&E
Renal neoplasm, not otherwise specified
PathXAI-Report (core)
Carcinoma
PathXAI-Report
clear cell renal cell carcinoma
Grade · TCGA-2H-A9GM
Reference: "Moderately differentiated"
PLIP-guided Qwen "Grade: high grade"
PathXAI-Report "Grade: Moderately differentiated."
Parsed grades: reference 2 · PLIP-guided Qwen 3 · PathXAI-Report 2
Supplementary Figure 12 Automated report evaluation on the public cohort. (a) Systems and output scope. PRISM2 supplies diagnosis only. (b) Cancer family match rate. Gains subtract each comparator from PathXAI-Report. (c) Histological grade. Balanced grade accuracy weights reference grades equally; missing or incompatible predictions are incorrect. Matrices show raw counts. (d) Findings and coverage. Finding contradiction rate requires comparable assertions and has method-specific denominators; interpret it with finding coverage. (e) Diagnostic specificity and grade examples. Full estimates are in Supplementary Tables 13.1 to 13.7. (Notation: arrows, preferred directions; dashed line, always predicting grade 3. Whiskers show pointwise 95% confidence intervals (Supplementary Methods section 3.10).)
Supplementary Table 13.4 Public exact diagnosis match rate and diagnostic composite results for the public development subset (456 cases) and public evaluation cohort (1,200 cases).
| Method | Development subset (456)Exact diagnosis match rate | Evaluation cohort (1,200)Exact diagnosis match rate | Development subset (456)Diagnostic composite | Evaluation cohort (1,200)Diagnostic composite |
|---|---|---|---|---|
| Qwen + H&E | 61.6 [56.3, 66.8]n=352 | 58.9 [54.9, 62.9]n=604 | 81.0 [78.4, 83.5]n=456 | 88.6 [87.5, 89.7]n=1200 |
| DeepSeek + H&E | 62.5 [57.2, 67.6]n=352 | 60.3 [56.2, 64.2]n=604 | 81.5 [79.0, 83.9]n=456 | 86.3 [84.9, 87.7]n=1200 |
| GLM + H&E | 46.6 [41.3, 52.0]n=352 | 56.0 [51.9, 60.0]n=604 | 69.1 [65.9, 72.4]n=456 | 77.5 [75.5, 79.4]n=1200 |
| MedGemma | 3.7 [2.0, 6.2]n=352 | 6.1 [4.3, 8.3]n=604 | 43.1 [40.0, 46.3]n=456 | 54.7 [52.5, 57.0]n=1200 |
| PLIP-guided Qwen | 23.9 [19.5, 28.7]n=352 | 39.2 [35.3, 43.3]n=604 | 56.6 [53.4, 59.9]n=456 | 86.0 [84.8, 87.2]n=1200 |
| PRISM2 | 49.1 [43.8, 54.5]n=352 | 52.6 [48.6, 56.7]n=604 | 73.2 [70.1, 76.3]n=456 | 83.5 [82.0, 85.1]n=1200 |
| PathXAI-Report (core) | 64.8 [59.5, 69.8]n=352 | 58.1 [54.1, 62.1]n=604 | 82.5 [80.0, 85.0]n=456 | 88.2 [87.0, 89.3]n=1200 |
| PathXAI-Report | 66.2 [61.0, 71.1]n=352 | 62.3 [58.3, 66.1]n=604 | 84.1 [81.8, 86.3]n=456 | 89.8 [88.7, 90.8]n=1200 |
Supplementary Table 13.5 Public-cohort grade results by grading system. The primary estimate calculates recall within each reference grade and equally weights the represented grades. Interval construction follows Supplementary Methods section 3.10. The always-high baseline predicts the highest allowed grade in each grading system. Its class-balanced score is 1/K when that grade is represented and zero otherwise; brackets show the theoretical 1/K value, not a confidence interval. Sensitivity columns report case-average exact grade agreement and grade macro-F1; grading systems are never pooled.
| System | Method | Balanced grade accuracy [95% CI] | n | K | Always-high [1/K] | Case-average exact grade agreement (sensitivity) | Grade macro-F1 (sensitivity) |
|---|---|---|---|---|---|---|---|
| Fuhrman (1-4) | DeepSeek + H&E | 1.7 [0.1, 38.1]n=107 | 107 | 4 | 25.0 [25.0] | 1.9 | 3.2 |
| Fuhrman (1-4) | GLM + H&E | 0.0 [0.0, 35.3]n=107 | 107 | 4 | 25.0 [25.0] | 0.0 | 0.0 |
| Fuhrman (1-4) | PLIP-guided Qwen | 0.0 [0.0, 35.3]n=107 | 107 | 4 | 25.0 [25.0] | 0.0 | 0.0 |
| Fuhrman (1-4) | PathXAI-Report (core) | 0.0 [0.0, 35.3]n=107 | 107 | 4 | 25.0 [25.0] | 0.0 | 0.0 |
| Fuhrman (1-4) | PathXAI-Report | 0.0 [0.0, 35.3]n=107 | 107 | 4 | 25.0 [25.0] | 0.0 | 0.0 |
| Fuhrman (1-4) | MedGemma | 0.0 [0.0, 35.3]n=107 | 107 | 4 | 25.0 [25.0] | 0.0 | 0.0 |
| Fuhrman (1-4) | Qwen + H&E | 0.0 [0.0, 35.3]n=107 | 107 | 4 | 25.0 [25.0] | 0.0 | 0.0 |
| Gleason (2-10) | DeepSeek + H&E | 0.0 [0.0, 98.8]n=2 | 2 | 2 | 50.0 [50.0] | 0.0 | 0.0 |
| Gleason (2-10) | GLM + H&E | 0.0 [0.0, 98.8]n=2 | 2 | 2 | 50.0 [50.0] | 0.0 | 0.0 |
| Gleason (2-10) | PLIP-guided Qwen | 0.0 [0.0, 98.8]n=2 | 2 | 2 | 50.0 [50.0] | 0.0 | 0.0 |
| Gleason (2-10) | PathXAI-Report (core) | 0.0 [0.0, 98.8]n=2 | 2 | 2 | 50.0 [50.0] | 0.0 | 0.0 |
| Gleason (2-10) | PathXAI-Report | 0.0 [0.0, 98.8]n=2 | 2 | 2 | 50.0 [50.0] | 0.0 | 0.0 |
| Gleason (2-10) | MedGemma | 0.0 [0.0, 98.8]n=2 | 2 | 2 | 50.0 [50.0] | 0.0 | 0.0 |
| Gleason (2-10) | Qwen + H&E | 0.0 [0.0, 98.8]n=2 | 2 | 2 | 50.0 [50.0] | 0.0 | 0.0 |
| Histological (1-3) | DeepSeek + H&E | 39.1 [33.2, 46.8]n=671 | 671 | 3 | 33.3 [33.3] | 51.4 | 42.6 |
| Histological (1-3) | GLM + H&E | 35.8 [29.4, 44.0]n=671 | 671 | 3 | 33.3 [33.3] | 46.1 | 41.5 |
| Histological (1-3) | PLIP-guided Qwen | 31.8 [30.7, 35.3]n=671 | 671 | 3 | 33.3 [33.3] | 47.2 | 21.6 |
| Histological (1-3) | PathXAI-Report (core) | 29.4 [24.4, 36.6]n=671 | 671 | 3 | 33.3 [33.3] | 39.5 | 36.6 |
Continued on next page
Supplementary Table 13.5 (continued)
| System | Method | Balanced grade accuracy [95% CI] | n | K | Always-high [1/K] | Case-average exact grade agreement (sensitivity) | Grade macro-F1 (sensitivity) |
|---|---|---|---|---|---|---|---|
| Histological (1-3) | PathXAI-Report | 38.2 [33.0, 45.3] n=671 | 671 | 3 | 33.3 [33.3] | 50.4 | 41.5 |
| Histological (1-3) | MedGemma | 19.8 [17.4, 24.8] n=671 | 671 | 3 | 33.3 [33.3] | 29.4 | 18.6 |
| Histological (1-3) | Qwen + H&E | 22.6 [17.9, 29.8] n=671 | 671 | 3 | 33.3 [33.3] | 30.4 | 30.9 |
| ISUP (1-5) | DeepSeek + H&E | 0.0 [0.0, 97.5] n=1 | 1 | 1 | 0.0 [100.0] | 0.0 | 0.0 |
| ISUP (1-5) | GLM + H&E | 0.0 [0.0, 97.5] n=1 | 1 | 1 | 0.0 [100.0] | 0.0 | 0.0 |
| ISUP (1-5) | PLIP-guided Qwen | 0.0 [0.0, 97.5] n=1 | 1 | 1 | 0.0 [100.0] | 0.0 | 0.0 |
| ISUP (1-5) | PathXAI-Report (core) | 0.0 [0.0, 97.5] n=1 | 1 | 1 | 0.0 [100.0] | 0.0 | 0.0 |
| ISUP (1-5) | PathXAI-Report | 0.0 [0.0, 97.5] n=1 | 1 | 1 | 0.0 [100.0] | 0.0 | 0.0 |
| ISUP (1-5) | MedGemma | 0.0 [0.0, 97.5] n=1 | 1 | 1 | 0.0 [100.0] | 0.0 | 0.0 |
| ISUP (1-5) | Qwen + H&E | 0.0 [0.0, 97.5] n=1 | 1 | 1 | 0.0 [100.0] | 0.0 | 0.0 |
| Nuclear (1-3) | DeepSeek + H&E | 0.0 [0.0, 57.1] n=21 | 21 | 3 | 33.3 [33.3] | 0.0 | 0.0 |
| Nuclear (1-3) | GLM + H&E | 0.0 [0.0, 57.1] n=21 | 21 | 3 | 33.3 [33.3] | 0.0 | 0.0 |
| Nuclear (1-3) | PLIP-guided Qwen | 0.0 [0.0, 57.1] n=21 | 21 | 3 | 33.3 [33.3] | 0.0 | 0.0 |
| Nuclear (1-3) | PathXAI-Report (core) | 0.0 [0.0, 57.1] n=21 | 21 | 3 | 33.3 [33.3] | 0.0 | 0.0 |
| Nuclear (1-3) | PathXAI-Report | 0.0 [0.0, 57.1] n=21 | 21 | 3 | 33.3 [33.3] | 0.0 | 0.0 |
| Nuclear (1-3) | MedGemma | 0.0 [0.0, 57.1] n=21 | 21 | 3 | 33.3 [33.3] | 0.0 | 0.0 |
| Nuclear (1-3) | Qwen + H&E | 0.0 [0.0, 57.1] n=21 | 21 | 3 | 33.3 [33.3] | 0.0 | 0.0 |
| WHO (1-4) | DeepSeek + H&E | 0.0 [0.0, 68.2] n=25 | 25 | 4 | 25.0 [25.0] | 0.0 | 0.0 |
| WHO (1-4) | GLM + H&E | 16.1 [2.0, 81.1] n=25 | 25 | 4 | 25.0 [25.0] | 24.0 | 21.9 |
| WHO (1-4) | PLIP-guided Qwen | 0.0 [0.0, 68.2] n=25 | 25 | 4 | 25.0 [25.0] | 0.0 | 0.0 |
| WHO (1-4) | PathXAI-Report (core) | 0.0 [0.0, 68.2] n=25 | 25 | 4 | 25.0 [25.0] | 0.0 | 0.0 |
| WHO (1-4) | PathXAI-Report | 14.1 [0.1, 72.6] n=25 | 25 | 4 | 25.0 [25.0] | 8.0 | 12.8 |
| WHO (1-4) | MedGemma | 0.0 [0.0, 68.2] n=25 | 25 | 4 | 25.0 [25.0] | 0.0 | 0.0 |
| WHO (1-4) | Qwen + H&E | 1.6 [0.0, 70.7] n=25 | 25 | 4 | 25.0 [25.0] | 4.0 | 2.8 |
Supplementary Table 13.6 Public-cohort ordinal grade agreement sensitivity by grading system. Values are case-average percentages with pointwise 95% confidence intervals and metric-applicable n. Grading systems are reported separately.
| System | Method | Ordinal grade agreement [95% CI] |
|---|---|---|
| Fuhrman (1-4) | DeepSeek + H&E | 1.9 [0.1, 7.8] n=107 |
| Fuhrman (1-4) | GLM + H&E | 0.0 [0.0, 4.4] n=107 |
| Fuhrman (1-4) | PLIP-guided Qwen | 0.0 [0.0, 4.4] n=107 |
| Fuhrman (1-4) | PathXAI-Report (core) | 0.0 [0.0, 4.4] n=107 |
| Fuhrman (1-4) | PathXAI-Report | 0.0 [0.0, 4.4] n=107 |
Continued on next page
Supplementary Table 13.6 (continued)
| System | Method | Ordinal grade agreement [95% CI] |
|---|---|---|
| Fuhrman (1–4) | MedGemma | 0.0 [0.0, 4.4]n=107 |
| Fuhrman (1–4) | Qwen + H&E | 0.0 [0.0, 4.4]n=107 |
| Gleason (2–10) | DeepSeek + H&E | 0.0 [0.0, 94.4]n=2 |
| Gleason (2–10) | GLM + H&E | 0.0 [0.0, 94.4]n=2 |
| Gleason (2–10) | PLIP-guided Qwen | 0.0 [0.0, 94.4]n=2 |
| Gleason (2–10) | PathXAI-Report (core) | 0.0 [0.0, 94.4]n=2 |
| Gleason (2–10) | PathXAI-Report | 0.0 [0.0, 94.4]n=2 |
| Gleason (2–10) | MedGemma | 0.0 [0.0, 94.4]n=2 |
| Gleason (2–10) | Qwen + H&E | 0.0 [0.0, 94.4]n=2 |
| Histological (1–3) | DeepSeek + H&E | 65.0 [60.9, 68.9]n=671 |
| Histological (1–3) | GLM + H&E | 56.9 [52.6, 61.1]n=671 |
| Histological (1–3) | PLIP-guided Qwen | 66.4 [62.6, 70.0]n=671 |
| Histological (1–3) | PathXAI-Report (core) | 46.6 [42.3, 51.0]n=671 |
| Histological (1–3) | PathXAI-Report | 61.9 [57.7, 66.0]n=671 |
| Histological (1–3) | MedGemma | 40.8 [36.6, 45.0]n=671 |
| Histological (1–3) | Qwen + H&E | 36.2 [32.1, 40.5]n=671 |
| ISUP (1–5) | DeepSeek + H&E | 0.0 [0.0, 99.4]n=1 |
| ISUP (1–5) | GLM + H&E | 0.0 [0.0, 99.4]n=1 |
| ISUP (1–5) | PLIP-guided Qwen | 0.0 [0.0, 99.4]n=1 |
| ISUP (1–5) | PathXAI-Report (core) | 0.0 [0.0, 99.4]n=1 |
| ISUP (1–5) | PathXAI-Report | 0.0 [0.0, 99.4]n=1 |
| ISUP (1–5) | MedGemma | 0.0 [0.0, 99.4]n=1 |
| ISUP (1–5) | Qwen + H&E | 0.0 [0.0, 99.4]n=1 |
| Nuclear (1–3) | DeepSeek + H&E | 0.0 [0.0, 18.8]n=21 |
| Nuclear (1–3) | GLM + H&E | 0.0 [0.0, 18.8]n=21 |
| Nuclear (1–3) | PLIP-guided Qwen | 0.0 [0.0, 18.8]n=21 |
| Nuclear (1–3) | PathXAI-Report (core) | 0.0 [0.0, 18.8]n=21 |
| Nuclear (1–3) | PathXAI-Report | 0.0 [0.0, 18.8]n=21 |
| Nuclear (1–3) | MedGemma | 0.0 [0.0, 18.8]n=21 |
| Nuclear (1–3) | Qwen + H&E | 0.0 [0.0, 18.8]n=21 |
| WHO (1–4) | DeepSeek + H&E | 13.3 [3.8, 35.6]n=25 |
| WHO (1–4) | GLM + H&E | 26.7 [9.0, 52.3]n=25 |
| WHO (1–4) | PLIP-guided Qwen | 0.0 [0.0, 17.4]n=25 |
| WHO (1–4) | PathXAI-Report (core) | 6.7 [1.1, 27.4]n=25 |
Continued on next page
Supplementary Table 13.6 (continued)
| System | Method | Ordinal grade agreement [95% CI] |
|---|---|---|
| WHO (1–4) | PathXAI-Report | 21.3 [6.8, 45.9]n=25 |
| WHO (1–4) | MedGemma | 0.0 [0.0, 17.4]n=25 |
| WHO (1–4) | Qwen + H&E | 6.7 [0.4, 28.3]n=25 |
Supplementary Table 13.7 Public paired comparisons (Supplementary Fig. 12(b)) show PathXAI-Report minus each comparator. Differences are expressed in pp with paired case-bootstrap 95% intervals; n is paired metric-applicable cases. The Source Data table contains the complete set of paired results.
| Comparator | Metric | n | Difference [95% CI] |
|---|---|---|---|
| Qwen + H&E | Diagnostic composite (cohort target) | 1656 | 2.5 [1.6, 3.5] |
| Qwen + H&E | Cancer family match rate | 1656 | 4.6 [2.7, 6.6] |
| Qwen + H&E | Finding F1 | 1405 | 5.5 [3.7, 7.3] |
| Qwen + H&E | Finding coverage (A/D) | 1405 | 4.1 [2.5, 5.8] |
| Qwen + H&E | Finding recall (C/D) | 1405 | 4.8 [3.2, 6.5] |
| Qwen + H&E | Finding contradiction rate (E/A) | 938 | -5.8 [-7.9, -3.8] |
| DeepSeek + H&E | Diagnostic composite (cohort target) | 1656 | 2.7 [1.6, 3.8] |
| DeepSeek + H&E | Cancer family match rate | 1656 | 2.1 [0.0, 4.3] |
| DeepSeek + H&E | Finding F1 | 1405 | 8.1 [6.0, 10.3] |
| DeepSeek + H&E | Finding coverage (A/D) | 1405 | 1.8 [-0.3, 3.8] |
| DeepSeek + H&E | Finding recall (C/D) | 1405 | 6.7 [4.7, 8.6] |
| DeepSeek + H&E | Finding contradiction rate (E/A) | 871 | -10.0 [-12.5, -7.4] |
| GLM + H&E | Diagnostic composite (cohort target) | 1656 | 13.5 [11.9, 15.1] |
| GLM + H&E | Cancer family match rate | 1656 | 13.5 [10.8, 16.0] |
| GLM + H&E | Finding F1 | 1405 | 4.6 [2.4, 6.8] |
| GLM + H&E | Finding coverage (A/D) | 1405 | -1.5 [-3.7, 0.7] |
| GLM + H&E | Finding recall (C/D) | 1405 | 3.4 [1.4, 5.5] |
| GLM + H&E | Finding contradiction rate (E/A) | 900 | -9.8 [-12.3, -7.3] |
| MedGemma | Diagnostic composite (cohort target) | 1656 | 44.7 [43.1, 46.3] |
| MedGemma | Cancer family match rate | 1656 | 66.7 [64.4, 68.9] |
| MedGemma | Finding F1 | 1405 | 12.3 [10.2, 14.3] |
| MedGemma | Finding coverage (A/D) | 1405 | 11.3 [9.3, 13.3] |
| MedGemma | Finding recall (C/D) | 1405 | 10.6 [8.7, 12.6] |
| MedGemma | Finding contradiction rate (E/A) | 756 | -1.6 [-4.0, 0.8] |
| PLIP-guided Qwen | Diagnostic composite (cohort target) | 1656 | 15.9 [14.5, 17.3] |
| PLIP-guided Qwen | Cancer family match rate | 1656 | 32.4 [30.0, 34.8] |
| PLIP-guided Qwen | Finding F1 | 1405 | 27.7 [25.5, 29.9] |
| PLIP-guided Qwen | Finding coverage (A/D) | 1405 | 29.4 [27.4, 31.4] |
| PLIP-guided Qwen | Finding recall (C/D) | 1405 | 24.4 [22.5, 26.4] |
| PLIP-guided Qwen | Finding contradiction rate (E/A) | 432 | 4.7 [2.2, 7.3] |
| PRISM2 | Diagnostic composite (cohort target) | 1656 | 11.7 [10.1, 13.3] |
| PRISM2 | Cancer family match rate | 1656 | 19.7 [16.6, 22.8] |
| PRISM2 | Finding F1 | 0 | NA |
| PRISM2 | Finding coverage (A/D) | 0 | NA |
| PRISM2 | Finding recall (C/D) | 0 | NA |
| PRISM2 | Finding contradiction rate (E/A) | 0 | NA |
| PathXAI-Report (core) | Diagnostic composite (cohort target) | 1656 | 2.3 [1.4, 3.2] |
| PathXAI-Report (core) | Cancer family match rate | 1656 | 4.0 [2.2, 5.8] |
| PathXAI-Report (core) | Finding F1 | 1405 | 2.6 [1.0, 4.2] |
| PathXAI-Report (core) | Finding coverage (A/D) | 1405 | 3.6 [2.1, 5.2] |
| PathXAI-Report (core) | Finding recall (C/D) | 1405 | 2.6 [1.1, 4.1] |
| PathXAI-Report (core) | Finding contradiction rate (E/A) | 950 | 0.9 [-0.6, 2.4] |
Overall grade accuracy and answering
In the public evaluation cohort, overall histological-grade accuracy was 234/497 (47.1%) for PathXAI-Report and 156/497 (31.4%) for Qwen + H&E, counting unanswered cases as incorrect. Balanced grade accuracy was 35.9% and 23.6%, respectively. Compatible-grade coverage was 375/497 (75.5%) and 228/497 (45.9%); conditional accuracy among answered cases was 234/375 (62.4%) and 156/228 (68.4%). The conditional comparison concerns different answering subsets and is interpreted alongside the overall measures (Supplementary Fig. 13 and Supplementary Table 14).
(a) Public evaluation cohort
| Overall accuracy ↑ | Balanced grade accuracy ↑ | Grade coverage ↑ | Conditional accuracy ↑ | |
|---|---|---|---|---|
| Qwen + H&E | 31.4 | 23.6 | 45.9 | 68.4 |
| DeepSeek + H&E | 48.3 | 37.1 | 78.1 | 61.9 |
| GLM + H&E | 44.5 | 34.9 | 70.2 | 63.3 |
| MedGemma | 28.6 | 20.4 | 59.0 | 48.5 |
| PLIP-guided Qwen | 46.7 | 33.3 | 99.8 | 46.8 |
| PathXAI-Report (core) | 39.4 | 29.7 | 57.9 | 68.1 |
| PathXAI-Report | 47.1 | 35.9 | 75.5 | 62.4 |
| Always Grade 2 | 40.4 | 33.3 | 100.0 | 40.4 |
(b) Public development subset
| Overall accuracy ↑ | Balanced grade accuracy ↑ | Grade coverage ↑ | Conditional accuracy ↑ | |
|---|---|---|---|---|
| Qwen + H&E | 27.6 | 23.0 | 33.9 | 81.4 |
| DeepSeek + H&E | 60.3 | 48.2 | 84.5 | 71.4 |
| GLM + H&E | 50.6 | 41.1 | 75.9 | 66.7 |
| MedGemma | 31.6 | 18.5 | 52.3 | 60.4 |
| PLIP-guided Qwen | 48.9 | 28.3 | 86.2 | 56.7 |
| PathXAI-Report (core) | 39.7 | 31.4 | 48.9 | 81.2 |
| PathXAI-Report | 59.8 | 47.5 | 77.6 | 77.0 |
| Always Grade 2 | 37.4 | 33.3 | 100.0 | 37.4 |
(c) Private cohort, reference set P1
| Overall accuracy ↑ | Balanced grade accuracy ↑ | Grade coverage ↑ | Conditional accuracy ↑ | |
|---|---|---|---|---|
| Qwen + H&E | 17.1 | 13.0 | 30.3 | 56.5 |
| DeepSeek + H&E | 26.3 | 21.2 | 53.9 | 48.8 |
| GLM + H&E | 40.8 | 27.2 | 84.2 | 48.4 |
| MedGemma | 15.8 | 18.1 | 44.7 | 35.3 |
| PLIP-guided Qwen | 26.3 | 31.7 | 92.1 | 28.6 |
| PathXAI-Report (core) | 23.7 | 17.1 | 36.8 | 64.3 |
| PathXAI-Report | 48.7 | 28.1 | 77.6 | 62.7 |
| Always Grade 2 | 69.7 | 33.3 | 100.0 | 69.7 |
(d) Private cohort, reference set P2
| Overall accuracy ↑ | Balanced grade accuracy ↑ | Grade coverage ↑ | Conditional accuracy ↑ | |
|---|---|---|---|---|
| Qwen + H&E | 19.7 | 20.4 | 31.6 | 62.5 |
| DeepSeek + H&E | 28.9 | 36.3 | 53.9 | 53.7 |
| GLM + H&E | 48.7 | 47.2 | 84.2 | 57.8 |
| MedGemma | 13.2 | 23.6 | 44.7 | 29.4 |
| PLIP-guided Qwen | 17.1 | 33.3 | 92.1 | 18.6 |
| PathXAI-Report (core) | 25.0 | 24.6 | 38.2 | 65.5 |
| PathXAI-Report | 63.2 | 42.7 | 78.9 | 80.0 |
| Always Grade 2 | 78.9 | 33.3 | 100.0 | 78.9 |
Supplementary Figure 13 Histological-grade accuracy and answering. Overall accuracy counts unanswered or incompatible grades as incorrect; balanced grade accuracy additionally weights reference grades equally. Coverage is the fraction receiving a compatible grade. Conditional accuracy uses each method's answered cases. All panels use the same percentage scale. Values are descriptive estimates; counts are in Supplementary Table 14. The Grade 2 control always predicts Grade 2. PRISM2 is omitted because it provides diagnosis-only outputs.
| Method | Overall accuracy correct/N (%) | Coverage n/N (%) | Conditional accuracy correct/n (%) | Balanced accuracy (%) |
|---|---|---|---|---|
| Supplementary Table 14 Histological-grade accuracy and answering. Overall accuracy uses all applicable cases; unanswered or incompatible grades count as incorrect. Coverage is a definite answer in the reference grading system; conditional accuracy uses answered cases only. Counts and percentages are shown. Balanced grade accuracy also includes unanswered cases as incorrect and weights reference grades equally. These are descriptive summaries of existing predictions. Conditional accuracy uses method-specific answering subsets. PRISM2 has diagnosis-only outputs. Other grading systems are supplied in Source Data. | ||||
| Method | Overall accuracy correct/N (%) | Coverage n/N (%) | Conditional accuracy correct/n (%) | Balanced accuracy (%) |
| Public development subset (applicable n=174) | ||||
| Qwen + H&E | 48/174 (27.6) | 59/174 (33.9) | 48/59 (81.4) | 23.0 |
| DeepSeek + H&E | 105/174 (60.3) | 147/174 (84.5) | 105/147 (71.4) | 48.2 |
| GLM + H&E | 88/174 (50.6) | 132/174 (75.9) | 88/132 (66.7) | 41.1 |
| MedGemma | 55/174 (31.6) | 91/174 (52.3) | 55/91 (60.4) | 18.5 |
| PLIP-guided Qwen | 85/174 (48.9) | 150/174 (86.2) | 85/150 (56.7) | 28.3 |
| PathXAI-Report (core) | 69/174 (39.7) | 85/174 (48.9) | 69/85 (81.2) | 31.4 |
| PathXAI-Report | 104/174 (59.8) | 135/174 (77.6) | 104/135 (77.0) | 47.5 |
| Always Grade 2 | 65/174 (37.4) | 174/174 (100.0) | 65/174 (37.4) | 33.3 |
| Public evaluation cohort (applicable n=497) | ||||
| Qwen + H&E | 156/497 (31.4) | 228/497 (45.9) | 156/228 (68.4) | 23.6 |
| DeepSeek + H&E | 240/497 (48.3) | 388/497 (78.1) | 240/388 (61.9) | 37.1 |
| GLM + H&E | 221/497 (44.5) | 349/497 (70.2) | 221/349 (63.3) | 34.9 |
| MedGemma | 142/497 (28.6) | 293/497 (59.0) | 142/293 (48.5) | 20.4 |
| PLIP-guided Qwen | 232/497 (46.7) | 496/497 (99.8) | 232/496 (46.8) | 33.3 |
| PathXAI-Report (core) | 196/497 (39.4) | 288/497 (57.9) | 196/288 (68.1) | 29.7 |
| PathXAI-Report | 234/497 (47.1) | 375/497 (75.5) | 234/375 (62.4) | 35.9 |
| Always Grade 2 | 201/497 (40.4) | 497/497 (100.0) | 201/497 (40.4) | 33.3 |
| Private reference set P1 (applicable n=76) | ||||
| Qwen + H&E | 13/76 (17.1) | 23/76 (30.3) | 13/23 (56.5) | 13.0 |
| DeepSeek + H&E | 20/76 (26.3) | 41/76 (53.9) | 20/41 (48.8) | 21.2 |
| GLM + H&E | 31/76 (40.8) | 64/76 (84.2) | 31/64 (48.4) | 27.2 |
| MedGemma | 12/76 (15.8) | 34/76 (44.7) | 12/34 (35.3) | 18.1 |
| PLIP-guided Qwen | 20/76 (26.3) | 70/76 (92.1) | 20/70 (28.6) | 31.7 |
| PathXAI-Report (core) | 18/76 (23.7) | 28/76 (36.8) | 18/28 (64.3) | 17.1 |
| PathXAI-Report | 37/76 (48.7) | 59/76 (77.6) | 37/59 (62.7) | 28.1 |
| Always Grade 2 | 53/76 (69.7) | 76/76 (100.0) | 53/76 (69.7) | 33.3 |
| Private reference set P2 (applicable n=76) | ||||
| Qwen + H&E | 15/76 (19.7) | 24/76 (31.6) | 15/24 (62.5) | 20.4 |
| DeepSeek + H&E | 22/76 (28.9) | 41/76 (53.9) | 22/41 (53.7) | 36.3 |
| GLM + H&E | 37/76 (48.7) | 64/76 (84.2) | 37/64 (57.8) | 47.2 |
| MedGemma | 10/76 (13.2) | 34/76 (44.7) | 10/34 (29.4) | 23.6 |
| PLIP-guided Qwen | 13/76 (17.1) | 70/76 (92.1) | 13/70 (18.6) | 33.3 |
| PathXAI-Report (core) | 19/76 (25.0) | 29/76 (38.2) | 19/29 (65.5) | 24.6 |
| PathXAI-Report | 48/76 (63.2) | 60/76 (78.9) | 48/60 (80.0) | 42.7 |
| Always Grade 2 | 60/76 (78.9) | 76/76 (100.0) | 60/76 (78.9) | 33.3 |
Ordinal agreement and grading-system availability
Among compatible histological-grade answers, linear weighted was 0.305 for PathXAI-Report and 0.394 for Qwen + H&E in the public evaluation cohort. The corresponding values were 0.099 and 0.173 against private reference set P1, and 0.455 and 0.299 against P2 (Supplementary Table 15). The zero Fuhrman and nuclear-grade accuracy in the combined public cohort reflected the absence of compatible answers in the extracted predictions. Of 107 Fuhrman cases, PathXAI-Report had no definite grade in 99 and used a different grading system in eight; the corresponding counts were 17 and four among 21 nuclear-grade cases. In the private comparison, neither reference set provided an assessable grade for the 62 prostate cases, so these cases did not contribute to grade accuracy. Source Data provide all grading-system and cancer/organ strata, reference availability and prediction-system counts.
Supplementary Table 15 Histological-grade agreement among compatible answers. Linear weighted uses definite grades 1–3 in the reference grading system. Answered/eligible counts show each method's coverage; overall accuracy counts unanswered and incompatible grades as incorrect. Brackets show unadjusted 95% percentile intervals from 4,000 bootstrap draws of answered case pairs. Answering subsets differ between methods. Development and combined-cohort estimates, other grading systems and cancer/organ strata are supplied in Source Data. PRISM2 is diagnosis-only.
| Method | Answered / eligible n | Overall accuracy (%) | Weighted [95% CI] |
|---|---|---|---|
| Public evaluation cohort | |||
| Qwen + H&E | 228 / 497 | 31.4 | 0.394 [0.289, 0.494] |
| DeepSeek + H&E | 388 / 497 | 48.3 | 0.323 [0.239, 0.403] |
| GLM + H&E | 349 / 497 | 44.5 | 0.353 [0.273, 0.435] |
| MedGemma | 293 / 497 | 28.6 | -0.025 [-0.051, -0.006] |
| PLIP-guided Qwen | 496 / 497 | 46.7 | 0.000 [0.000, 0.000] |
| PathXAI-Report (core) | 288 / 497 | 39.4 | 0.384 [0.290, 0.471] |
| PathXAI-Report | 375 / 497 | 47.1 | 0.305 [0.225, 0.386] |
| Private reference set P1 | |||
| Qwen + H&E | 23 / 76 | 17.1 | 0.173 [-0.162, 0.504] |
| DeepSeek + H&E | 41 / 76 | 26.3 | 0.180 [0.066, 0.342] |
| GLM + H&E | 64 / 76 | 40.8 | 0.150 [-0.021, 0.307] |
| MedGemma | 34 / 76 | 15.8 | 0.029 [0.000, 0.105] |
| PLIP-guided Qwen | 70 / 76 | 26.3 | 0.000 [0.000, 0.000] |
| HistGen | 25 / 76 | 13.2 | 0.046 [0.000, 0.172] |
| HistoGPT | 0 / 76 | 0.0 | Undefined |
| PathXAI-Report (core) | 28 / 76 | 23.7 | 0.352 [0.089, 0.624] |
| PathXAI-Report | 59 / 76 | 48.7 | 0.099 [-0.136, 0.347] |
| Private reference set P2 | |||
| Qwen + H&E | 24 / 76 | 19.7 | 0.299 [-0.016, 0.610] |
| DeepSeek + H&E | 41 / 76 | 28.9 | 0.192 [0.020, 0.395] |
| GLM + H&E | 64 / 76 | 48.7 | 0.282 [0.089, 0.463] |
| MedGemma | 34 / 76 | 13.2 | 0.022 [0.000, 0.079] |
| PLIP-guided Qwen | 70 / 76 | 17.1 | 0.000 [0.000, 0.000] |
| HistGen | 25 / 76 | 6.6 | 0.016 [0.000, 0.066] |
| HistoGPT | 0 / 76 | 0.0 | Undefined |
| PathXAI-Report (core) | 29 / 76 | 25.0 | 0.347 [0.048, 0.634] |
| PathXAI-Report | 60 / 76 | 63.2 | 0.455 [0.181, 0.694] |
1.2. Public-case membership
Supplementary Table 16 records the exclusions applied to the public cohort and its overlapping evaluation subsets. Cohort construction and screening are described in Supplementary Methods section 2.1.
Supplementary Table 16 Public-case selection and evaluation subsets. Checks excluded 51 cases whose supplied site descriptions contained disease names and one case with a corrupt source WSI. These exclusions apply to every public report analysis before aggregation and resampling. The input-policy and writing comparisons already omitted the corrupt case and use the same 456 eligible cases. Evaluation subsets overlap.
| Evaluation set | Before exclusion | Excluded | Evaluated |
|---|---|---|---|
| Public benchmark | 1,708 | 52 | 1,656 |
| Public development subset | 508 | 52 | 456 |
| Public evaluation cohort | 1,200 | 0 | 1,200 |
| Four reporting policies | 507 | 51 | 456 |
| Pathologist ranking and correction assessment | 145 | 13 | 132 |
| HistGen/HistoGPT four-method comparison | 324 | 12 | 312 |
| HistGen three-method comparison | 327 | 13 | 314 |
| Output constraints comparison | 46 | 4 | 42 |
| Region acquisition comparison | 471 | 39 | 432 |
| Writing-evidence comparison | 507 | 51 | 456 |
1.3. Report performance after excluding segmentation training cases
TCGA identifiers linked 28 public report cases to segmentation training pools, including three development cases and 25 cases from the public evaluation cohort. Excluding the latter left 1,175 evaluation cases. PathXAI-Report retained higher cancer family match rate and exact diagnosis match rate than Qwen + H&E, with paired differences of 4.60 pp and 3.54 pp, respectively. The corresponding differences versus DeepSeek + H&E were 0.68 pp and 2.19 pp, with intervals spanning zero (Supplementary Table 17). Finding F1 and finding recall remained higher, and finding contradiction rate lower, than both comparators. These exclusions address identifiable training-pool overlap; membership of a training pool does not establish that a sample was drawn during training.
Supplementary Table 17 Report comparisons after excluding cases shared with segmentation training pools. The primary public evaluation includes 1,200 cases; the sensitivity analysis excludes 25 cases with matching TCGA patient identifiers, leaving 1,175. Differences are PathXAI-Report minus the comparator in percentage points. The two n values are the applicable paired counts before and after exclusion. Brackets give unadjusted 95% intervals from 4,000 paired-case bootstrap draws after exclusion. Positive differences favour PathXAI-Report except for finding contradiction rate, where negative differences favour it. PRISM2 has no finding-level measures.
| Comparator | Paired n before / after | Primary difference (pp) | After exclusion (pp) [95% CI] |
|---|---|---|---|
| Cancer family match rate | |||
| Qwen + H&E | 1200 / 1175 | +4.42 | +4.60 [+2.21, +7.06] |
| DeepSeek + H&E | 1200 / 1175 | +0.58 | +0.68 [-1.96, +3.32] |
| GLM + H&E | 1200 / 1175 | +10.67 | +10.30 [+7.06, +13.53] |
| MedGemma | 1200 / 1175 | +65.83 | +65.70 [+62.98, +68.43] |
| PLIP-guided Qwen | 1200 / 1175 | +26.83 | +27.32 [+24.60, +30.04] |
| PRISM2 | 1200 / 1175 | +19.25 | +19.23 [+15.40, +23.06] |
| PathXAI-Report (core) | 1200 / 1175 | +4.33 | +4.17 [+2.04, +6.30] |
| Exact diagnosis match rate | |||
| Qwen + H&E | 604 / 594 | +3.31 | +3.54 [+0.17, +6.90] |
| DeepSeek + H&E | 604 / 594 | +1.99 | +2.19 [-1.68, +6.06] |
| GLM + H&E | 604 / 594 | +6.29 | +6.57 [+2.36, +10.77] |
| MedGemma | 604 / 594 | +56.13 | +56.57 [+52.53, +60.61] |
| PLIP-guided Qwen | 604 / 594 | +23.01 | +23.23 [+19.53, +26.94] |
| PRISM2 | 604 / 594 | +9.60 | +10.44 [+5.05, +15.66] |
| PathXAI-Report (core) | 604 / 594 | +4.14 | +4.21 [+1.52, +6.90] |
| Finding F1 | |||
| Qwen + H&E | 997 / 975 | +5.75 | +5.73 [+3.59, +7.94] |
| DeepSeek + H&E | 997 / 975 | +6.67 | +6.71 [+4.19, +9.19] |
| GLM + H&E | 997 / 975 | +4.60 | +4.62 [+2.01, +7.23] |
| MedGemma | 997 / 975 | +11.33 | +11.30 [+8.63, +13.89] |
| PLIP-guided Qwen | 997 / 975 | +26.88 | +26.96 [+24.51, +29.61] |
| PathXAI-Report (core) | 997 / 975 | +2.07 | +2.06 [+0.31, +3.90] |
| Finding recall | |||
| Qwen + H&E | 997 / 975 | +5.07 | +5.00 [+2.95, +7.07] |
| DeepSeek + H&E | 997 / 975 | +5.49 | +5.54 [+3.12, +7.88] |
| GLM + H&E | 997 / 975 | +3.50 | +3.57 [+1.02, +6.03] |
| MedGemma | 997 / 975 | +9.86 | +9.82 [+7.33, +12.18] |
| PLIP-guided Qwen | 997 / 975 | +23.87 | +23.92 [+21.55, +26.20] |
| PathXAI-Report (core) | 997 / 975 | +2.24 | +2.24 [+0.48, +4.09] |
| Finding contradiction rate | |||
| Qwen + H&E | 664 / 646 | -5.52 | -5.78 [-8.36, -3.32] |
| DeepSeek + H&E | 634 / 617 | -9.19 | -9.33 [-12.31, -6.35] |
| GLM + H&E | 644 / 629 | -10.01 | -10.25 [-13.33, -7.27] |
| MedGemma | 546 / 530 | -1.08 | -1.21 [-4.10, +1.64] |
| PLIP-guided Qwen | 327 / 316 | +4.75 | +4.91 [+2.12, +7.71] |
| PathXAI-Report (core) | 686 / 669 | +1.38 | +1.27 [-0.42, +2.99] |
1.4. Finding assertion, coverage and contradiction
Finding-level coverage and contradiction are reported together in Supplementary Table 18, including each method's number of reports with no comparable assertion. Comparing PathXAI-Report with PathXAI-Report (core), the paired difference in finding contradiction rate was +0.89 pp (95% CI, -0.59 to 2.39; n=950 cases with assessable assertions in both methods). Across the broader set of applicable diagnostic, grade, invasion and necrosis fields, PathXAI-Report supplied definite answers in 90.40% of fields, irrespective of correctness (Supplementary Table 13.3).
Supplementary Table 18 Finding-level agreement across public cases with documented reference findings. Equal-case percentages with pointwise 95% confidence intervals are shown together for Finding F1, finding coverage (A/D), finding recall (C/D), and finding contradiction rate (E/A). Zero-assertion cases (A=0) are counted separately; E/A is undefined for them, not scored as zero. PLIP-guided Qwen is the single-pass adaptation. Interval construction follows Supplementary Methods section 3.10.
| Method | n(D > 0) | n (A=0) | Finding F1 | Finding coverage(A/D) | Finding recall(C/D) | Finding contradictionrate (E/A) |
|---|---|---|---|---|---|---|
| Qwen + H&E | 1405 | 401 | 42.3 [40.4, 44.3]n=1405 | 42.5 [40.6, 44.3]n=1405 | 35.7 [33.9, 37.6]n=1405 | 17.0 [15.0, 19.0]n=1004 |
| DeepSeek + H&E | 1405 | 399 | 39.7 [37.8, 41.8]n=1405 | 44.8 [42.8, 46.7]n=1405 | 33.8 [32.1, 35.6]n=1405 | 24.1 [21.8, 26.5]n=1006 |
| GLM + H&E | 1405 | 352 | 43.2 [41.3, 45.1]n=1405 | 48.0 [46.1, 49.9]n=1405 | 37.1 [35.3, 39.0]n=1405 | 23.1 [20.9, 25.3]n=1053 |
| MedGemma | 1405 | 566 | 35.6 [33.6, 37.5]n=1405 | 35.3 [33.4, 37.2]n=1405 | 29.9 [28.0, 31.8]n=1405 | 15.3 [13.1, 17.6]n=839 |
| PLIP-guided Qwen | 1405 | 933 | 20.1 [18.5, 21.8]n=1405 | 17.1 [15.6, 18.7]n=1405 | 16.1 [14.7, 17.6]n=1405 | 7.2 [5.1, 9.4]n=472 |
| PathXAI-Report (core) | 1405 | 399 | 45.2 [43.2, 47.2]n=1405 | 42.9 [41.1, 44.8]n=1405 | 37.9 [36.0, 39.7]n=1405 | 11.1 [9.4, 12.8]n=1006 |
| PathXAI-Report | 1405 | 335 | 47.8 [45.9, 49.8]n=1405 | 46.6 [44.6, 48.4]n=1405 | 40.5 [38.6, 42.4]n=1405 | 12.7 [11.0, 14.5]n=1070 |
Fixed-reference and shared-finding comparisons
In the public evaluation cohort, contradictions per documented finding () averaged 5.5% for PathXAI-Report and 6.3% for Qwen + H&E (Supplementary Table 19). The paired difference was -0.8 pp, with an interval spanning zero (Supplementary Table 20). On identical finding types asserted by both methods, PathXAI-Report had fewer contradictions, with a paired difference of -6.0 pp across 656 cases. Against private reference sets P1/P2, was 17.7% / 14.2%, compared with 11.0% / 8.1% for Qwen + H&E; the shared-finding comparisons also favoured Qwen + H&E. Thus the direction of the private contradiction comparison persists when both methods are scored on the same asserted findings.
Public references predominantly recorded positive findings (Supplementary Table 21). Always asserting presence yielded a finding F1 of 86.3%, with 100% coverage and an of 13.7%. This control shows that finding F1 can reward indiscriminate assertion when undocumented types remain unscored. Finding agreement therefore needs to be interpreted with contradiction and coverage; it does not measure the truth of assertions absent from the reference.
Supplementary Table 19 Finding agreement and contradictions on a fixed reference denominator. counts reference-documented finding types, definite generated assertions on those types, matching polarities and opposite polarities. F1, coverage, recall and are equal-case percentages; includes zero-assertion cases as zero and equals coverage minus recall. Pooled is . Brackets are pointwise 95% case-bootstrap intervals from 4,000 resamples. The three fixed-polarity controls assert all 20 finding types without images; the per-finding rule uses the more frequent documented polarity in the 456-case development subset. Only reference-documented types are scored. PRISM2 provides diagnosis-only outputs and is omitted. P1 and P2 concern the same 151 private cases. Development, combined public, four-policy and 215-case dedicated-generator comparisons, counts and pooled are supplied in Source Data.
| Method | F1 | Coverage(A/D) | Recall(C/D) | Contradictions(E/D) | Pooled |
|---|---|---|---|---|---|
| Public evaluation cohort (n=997 cases with documented findings) | |||||
| Qwen + H&E | 43.0 | 42.9 | 36.6 | 6.3 [5.3, 7.4] | 7.1 |
| DeepSeek + H&E | 42.1 | 47.5 | 36.1 | 11.3 [9.8, 12.8] | 10.8 |
| GLM + H&E | 44.2 | 48.6 | 38.1 | 10.5 [9.1, 11.9] | 11.1 |
| MedGemma | 37.4 | 37.0 | 31.8 | 5.2 [4.3, 6.2] | 5.0 |
| PLIP-guided Qwen | 21.9 | 18.7 | 17.8 | 1.0 [0.6, 1.4] | 1.0 |
| PathXAI-Report (core) | 46.7 | 44.0 | 39.4 | 4.6 [3.6, 5.6] | 4.4 |
| PathXAI-Report | 48.8 | 47.2 | 41.6 | 5.5 [4.6, 6.6] | 5.7 |
| Always present | 86.3 | 100.0 | 86.3 | 13.7 [12.1, 15.3] | 14.1 |
| Always absent | 13.7 | 100.0 | 13.7 | 86.3 [84.7, 87.8] | 85.9 |
| Per-finding majority | 84.2 | 100.0 | 84.2 | 15.8 [14.3, 17.3] | 17.9 |
Continued on next page
Supplementary Table 19 (continued)
| Method | F1 | Coverage(A/D) | Recall(C/D) | Contradictions(E/D) | PooledE/D |
|---|---|---|---|---|---|
| Private reference set P1 (n=150 cases with documented findings) | |||||
| Qwen + H&E | 71.6 | 79.0 | 68.0 | 11.0 [7.7, 14.7] | 10.6 |
| DeepSeek + H&E | 66.4 | 78.7 | 61.7 | 17.0 [12.7, 21.3] | 17.1 |
| GLM + H&E | 63.1 | 63.3 | 56.7 | 6.7 [4.0, 9.7] | 6.8 |
| MedGemma | 38.4 | 63.0 | 35.7 | 27.3 [22.7, 32.3] | 26.4 |
| PLIP-guided Qwen | 31.1 | 30.7 | 23.3 | 7.3 [4.7, 10.7] | 7.5 |
| HistGen | 21.2 | 20.7 | 16.0 | 4.7 [2.7, 7.0] | 4.8 |
| HistoGPT | 9.2 | 14.7 | 7.3 | 7.3 [4.3, 10.3] | 7.2 |
| PathXAI-Report (core) | 67.3 | 84.3 | 64.0 | 20.3 [15.7, 25.0] | 19.5 |
| PathXAI-Report | 76.6 | 92.7 | 75.0 | 17.7 [13.0, 22.7] | 17.1 |
| Always present | 42.7 | 100.0 | 42.7 | 57.3 [53.3, 61.3] | 56.2 |
| Always absent | 57.3 | 100.0 | 57.3 | 42.7 [38.7, 46.7] | 43.8 |
| Per-finding majority | 42.7 | 100.0 | 42.7 | 57.3 [53.3, 61.3] | 56.2 |
| Private reference set P2 (n=151 cases with documented findings) | |||||
| Qwen + H&E | 73.3 | 78.0 | 70.0 | 8.1 [5.2, 11.3] | 8.6 |
| DeepSeek + H&E | 69.1 | 78.9 | 64.7 | 14.2 [10.5, 18.1] | 15.2 |
| GLM + H&E | 64.7 | 64.1 | 58.8 | 5.3 [2.8, 8.2] | 5.5 |
| MedGemma | 42.8 | 62.7 | 40.4 | 22.3 [17.8, 27.3] | 24.5 |
| PLIP-guided Qwen | 33.1 | 32.3 | 26.2 | 6.2 [3.5, 9.2] | 6.6 |
| HistGen | 21.5 | 22.0 | 16.9 | 5.1 [2.9, 7.4] | 5.9 |
| HistoGPT | 9.5 | 14.8 | 7.6 | 7.2 [4.3, 10.2] | 7.2 |
| PathXAI-Report (core) | 70.9 | 84.1 | 67.5 | 16.6 [12.4, 20.8] | 17.6 |
| PathXAI-Report | 78.9 | 91.5 | 77.3 | 14.2 [10.0, 18.7] | 14.8 |
| Always present | 52.4 | 100.0 | 52.4 | 47.6 [43.0, 52.2] | 49.7 |
| Always absent | 47.6 | 100.0 | 47.6 | 52.4 [47.9, 57.0] | 50.3 |
| Per-finding majority | 52.4 | 100.0 | 52.4 | 47.6 [42.9, 52.1] | 49.7 |
Supplementary Table 20 Paired differences in finding contradictions, PathXAI-Report minus comparator (percentage points). The fixed-reference comparison uses on every case with . The shared-finding comparison retains only reference-documented types explicitly asserted by both methods in the same case, calculates each method's opposite-polarity fraction on those identical types and averages the paired difference equally across cases with at least one shared type. Negative values favour PathXAI-Report. Brackets are pointwise 95% paired case-bootstrap intervals (4,000 resamples). Shared-finding denominators differ by comparator; item counts are not independent samples. All comparator contrasts and pooled shared-finding counts are supplied in Source Data.
| Comparator | Cases | Fixed-reference difference | Shared cases / items | Shared-finding difference |
|---|---|---|---|---|
| Public evaluation cohort | ||||
| Qwen + H&E | 997 | -0.8 [-2.0, 0.5] | 656 / 827 | -6.0 [-8.5, -3.6] |
| PathXAI-Report (core) | 997 | 1.0 [-0.1, 2.0] | 672 / 867 | 0.9 [-0.6, 2.4] |
| Private reference set P1 | ||||
| Qwen + H&E | 150 | 6.7 [1.7, 11.7] | 133 / 215 | 7.1 [2.3, 12.4] |
| PathXAI-Report (core) | 150 | -2.7 [-7.3, 1.7] | 140 / 229 | -3.2 [-7.1, 0.7] |
| Private reference set P2 | ||||
| Qwen + H&E | 151 | 6.2 [1.8, 10.7] | 131 / 208 | 5.7 [1.1, 10.3] |
| PathXAI-Report (core) | 151 | -2.3 [-6.2, 1.8] | 138 / 222 | -2.9 [-6.5, 0.7] |
Supplementary Table 21 Reference finding polarity. Cells are counts of cases with a definite present / absent reference for each finding type; undocumented, uncertain and conflicting references are excluded from these counts. A case can contribute to several finding types. Public counts use the 1,200-case evaluation cohort; P1/P2 each use the same 151 private cases. The 456-case development counts and fixed majority-polarity rule are supplied in Source Data.
| Finding | Public evaluation | P1 | P2 |
|---|---|---|---|
| Invasion | 612 / 29 | 120 / 23 | 122 / 24 |
| Necrosis | 258 / 48 | 8 / 141 | 15 / 120 |
| Lymphovascular invasion | 187 / 132 | 0 / 0 | 0 / 0 |
| Perineural invasion | 91 / 56 | 0 / 0 | 0 / 0 |
| Metastasis | 309 / 44 | 0 / 0 | 0 / 0 |
| Pleomorphism | 52 / 0 | 0 / 0 | 0 / 0 |
| Mitoses | 131 / 19 | 0 / 0 | 0 / 0 |
| Glandular | 76 / 3 | 0 / 0 | 9 / 0 |
| Papillary | 181 / 5 | 0 / 0 | 0 / 0 |
| Solid | 7 / 0 | 0 / 0 | 0 / 0 |
| Nested | 7 / 0 | 0 / 0 | 0 / 0 |
| Trabecular | 11 / 0 | 0 / 0 | 0 / 0 |
| Cribriform | 27 / 0 | 0 / 0 | 0 / 0 |
| Spindle | 21 / 1 | 0 / 0 | 0 / 0 |
| Clear cytoplasm | 6 / 0 | 0 / 0 | 0 / 0 |
| Hyperchromasia | 12 / 0 | 0 / 0 | 0 / 0 |
| Nucleoli | 12 / 0 | 0 / 0 | 0 / 0 |
| Desmoplasia | 10 / 0 | 0 / 0 | 0 / 0 |
| Inflammation | 12 / 2 | 0 / 0 | 0 / 0 |
| Calcification | 55 / 3 | 0 / 0 | 0 / 0 |
1.5. Comparisons with HistGen and HistoGPT
Supplementary Figure 14 presents both the 215-case shared evaluation comparison and the 312-case combined-cohort comparison. On the shared evaluation cases, PathXAI-Report had higher cancer family match rate, finding F1 and finding recall than HistGen and HistoGPT. Finding F1 reached 43.3%, compared with 17.2% for HistGen and 12.0% for HistoGPT. HistoGPT's lower finding contradiction rate accompanied lower finding coverage (Supplementary Table 10). For the combined cohort, Supplementary Tables 22.1 to 22.13 give all estimates and the separate 314-case HistGen sensitivity analysis. HistoGPT's non-skin evaluation is outside its original dermatopathology domain.
Supplementary Table 22.1 Automated report evaluation against dedicated report generators (Supplementary Fig. 14) on the 312 public cases shared by HistGen, HistoGPT, PathXAI-Report (core) and PathXAI-Report. Ordinary percentages are equal-case means with pointwise 95% confidence intervals; each cell gives the metric-applicable case count. Balanced grade accuracy uses histological grades 1–3 with equal weighting across represented reference grades and conservative confidence intervals. Reference entity availability is a reference property. ROUGE and compatible grade coverage are unavailable for this native comparison.
| Metric | HistGen | HistoGPT | PathXAI-Report (core) | PathXAI-Report |
|---|---|---|---|---|
| Cancer family match rate | 36.2[30.9, 41.8]n=312 | 4.2[2.2, 7.0]n=312 | 74.4[69.1, 79.1]n=312 | 79.5[74.6, 83.8]n=312 |
| Finding F1 | 17.2[13.6, 20.8]n=256 | 12.3[9.2, 15.6]n=256 | 44.9[40.4, 49.1]n=256 | 45.7[41.2, 49.9]n=256 |
| Finding coverage (A/D) | 21.0[17.2, 25.0]n=256 | 10.5[7.7, 13.5]n=256 | 43.4[39.0, 47.6]n=256 | 44.9[40.5, 49.4]n=256 |
| Finding recall (C/D) | 13.7[10.9, 17.0]n=256 | 9.6[7.0, 12.5]n=256 | 37.2[33.3, 41.3]n=256 | 38.2[34.3, 42.5]n=256 |
| Finding contradiction rate (E/A) | 32.4[24.1, 40.6]n=106 | 8.3[1.7, 15.0]n=60 | 12.5[8.7, 16.7]n=189 | 12.7[9.0, 16.6]n=193 |
| Balanced grade accuracy (histological 1–3) | 22.9[9.5, 48.6]n=73 | 0.0[0.0, 20.6]n=73 | 21.7[11.3, 46.7]n=73 | 34.2[19.0, 58.6]n=73 |
| Diagnostic composite (cohort target) | 57.9[53.9, 61.8]n=312 | 18.5[15.3, 21.9]n=312 | 84.7[81.9, 87.5]n=312 | 87.7[85.3, 90.1]n=312 |
| Diagnostic composite | 67.3[63.1, 71.5]n=312 | 24.8[20.9, 28.9]n=312 | 87.1[84.4, 89.6]n=312 | 89.1[86.7, 91.4]n=312 |
Continued on next page
Supplementary Table 22.1 (continued)
| Metric | HistGen | HistoGPT | PathXAI-Report (core) | PathXAI-Report |
|---|---|---|---|---|
| Exact diagnosis match rate | 38.5[29.9, 47.8]n=122 | 0.8[0.0, 4.5]n=122 | 62.3[53.1, 70.9]n=122 | 65.6[56.4, 73.9]n=122 |
| Reference entity availability (reference property) | 39.1[33.7, 44.8]n=312 | 39.1[33.7, 44.8]n=312 | 39.1[33.7, 44.8]n=312 | 39.1[33.7, 44.8]n=312 |
| Report field completeness | 68.6[65.2, 71.7]n=312 | 32.2[28.2, 36.2]n=312 | 87.9[85.7, 89.9]n=312 | 90.5[88.6, 92.3]n=312 |
| Broad diagnostic agreement | 70.5[65.1, 75.5]n=312 | 25.3[20.6, 30.5]n=312 | 94.9[91.8, 97.0]n=312 | 96.5[93.8, 98.2]n=312 |
| Malignancy agreement | 78.8[73.9, 83.2]n=312 | 36.2[30.9, 41.8]n=312 | 85.3[80.8, 89.0]n=312 | 86.5[82.2, 90.1]n=312 |
| Invasion agreement | 33.8[25.9, 42.5]n=133 | 18.8[12.5, 26.5]n=133 | 74.4[66.2, 81.6]n=133 | 82.0[74.4, 88.1]n=133 |
| Necrosis agreement | 1.9[0.2, 6.5]n=108 | 23.1[15.6, 32.2]n=108 | 74.1[64.8, 82.0]n=108 | 65.7[56.0, 74.6]n=108 |
| Critical-positive recall | 13.6[9.9, 17.6]n=214 | 14.1[10.2, 18.2]n=214 | 52.0[46.8, 57.4]n=214 | 52.2[47.1, 57.5]n=214 |
Supplementary Table 22.2 Continuation: Primary public comparison, 312 shared cases. Grade results for Fuhrman (1–4). Balanced grade accuracy equally weights represented reference grades, with conservative confidence intervals. Exact and ordinal agreement are case-average sensitivity measures. Values are percentages with pointwise 95% confidence intervals and metric-applicable n. Grading systems are reported separately.
| Metric | HistGen | HistoGPT | PathXAI-Report (core) | PathXAI-Report |
|---|---|---|---|---|
| Balanced grade accuracy | 16.7[0.1, 89.5]n=7 | 0.0[0.0, 86.6]n=7 | 0.0[0.0, 86.6]n=7 | 0.0[0.0, 86.6]n=7 |
| Exact grade agreement (sensitivity) | 14.3[0.4, 57.9]n=7 | 0.0[0.0, 41.0]n=7 | 0.0[0.0, 41.0]n=7 | 0.0[0.0, 41.0]n=7 |
| Ordinal grade agreement (sensitivity) | 23.8[1.4, 73.4]n=7 | 0.0[0.0, 49.5]n=7 | 0.0[0.0, 49.5]n=7 | 0.0[0.0, 49.5]n=7 |
Supplementary Table 22.3 Continuation: Primary public comparison, 312 shared cases. Grade results for Gleason (2–10). Balanced grade accuracy equally weights represented reference grades, with conservative confidence intervals. Exact and ordinal agreement are case-average sensitivity measures. Values are percentages with pointwise 95% confidence intervals and metric-applicable n. Grading systems are reported separately.
| Metric | HistGen | HistoGPT | PathXAI-Report (core) | PathXAI-Report |
|---|---|---|---|---|
| Balanced grade accuracy | 0.0[0.0, 97.5]n=1 | 0.0[0.0, 97.5]n=1 | 0.0[0.0, 97.5]n=1 | 0.0[0.0, 97.5]n=1 |
| Exact grade agreement (sensitivity) | 0.0[0.0, 97.5]n=1 | 0.0[0.0, 97.5]n=1 | 0.0[0.0, 97.5]n=1 | 0.0[0.0, 97.5]n=1 |
| Ordinal grade agreement (sensitivity) | 0.0[0.0, 99.7]n=1 | 0.0[0.0, 99.7]n=1 | 0.0[0.0, 99.7]n=1 | 0.0[0.0, 99.7]n=1 |
(a) Eligibility and completed reports
| Public eligibility and report availability | Patient-level HistGen train/validation exclusionCheckpoint split not independently established | |
|---|---|---|
| Benchmark 1,656 | Excluded 1,340 | Eligible 316 |
| Available reports in eligible public pool | Completed reports |
|---|---|
| HistGen | 314 |
| HistoGPT | 313 |
| PathXAI-Report (core) | 316 |
| PathXAI-Report | 316 |
Shared cases across compared methods
n = 312
HistoGPT: dermatopathology model; non-skin public and private evaluation is out-of-domain.
| Private pool | Eligible 152 | Primary benchmark shared 151 | All completed 152P1 and P2 analyzed separately |
(b) Public evaluation cohort
| Public evaluation215 shared cases% · 95% CI | Cancer familymatch rate ↑n = 215 | Exact diagnosismatch rate ↑n = 73 | Finding F1 ↑n = 173 | Findingrecall ↑n = 173 | Findingcontradiction rate ↓n varies |
|---|---|---|---|---|---|
| HistGen | 39.1 | 42.5 | 17.2 | 13.6 | 32.2 |
| HistoGPT | 5.1 | 1.4 | 12.0 | 8.8 | 9.3 |
| PathXAI-Report (core) | 73.5 | 58.9 | 43.2 | 35.8 | 12.5 |
| PathXAI-Report | 77.7 | 63.0 | 43.3 | 36.0 | 12.7 |
(c) Combined public cohort
Case means; grade class-balanced · 95% CI
Shared public cases · n = 312
| Cancer family match rate ↑Percent · metric-specific n | Finding F1 ↑Percent · metric-specific n | Finding coverage ↑Percent · metric-specific n | ||||
|---|---|---|---|---|---|---|
| 0 | 50 | 100 | 0 | 50 | 100 | |
| HistGen | 36.2% n = 312 | 17.2% n = 256 | 21.0% n = 256 | |||
| HistoGPT | 4.2% n = 312 | 12.3% n = 256 | 10.5% n = 256 | |||
| PathXAI-Report (core) | 74.4% n = 312 | 44.9% n = 256 | 43.4% n = 256 | |||
| PathXAI-Report | 79.5% n = 312 | 45.7% n = 256 | 44.9% n = 256 | |||
| Finding recall ↑Percent · metric-specific n | Finding contradiction rate ↓Percent · metric-specific n | Balanced grade accuracy ↑Grades 1–3 · dashed: always grade 3 | ||||
|---|---|---|---|---|---|---|
| 0 | 50 | 100 | 0 | 50 | 100 | |
| HistGen | 13.7% n = 256 | 32.4% n = 106 | 22.9% n = 73 | |||
| HistoGPT | 9.6% n = 256 | 8.3% n = 60 | 0.0% n = 73 | |||
| PathXAI-Report (core) | 37.2% n = 256 | 12.5% n = 189 | 21.7% n = 73 | |||
| PathXAI-Report | 38.2% n = 256 | 12.7% n = 193 | 34.2% n = 73 | |||
Supplementary Figure 14 Dedicated report generators on shared public cases. (a) Eligibility. Patients in HistGen's released training or validation lists are excluded; the checkpoint's exact training split is unverified. Evaluation uses cases with reports from every compared method. Non-skin cases fall outside HistoGPT's dermatopathology development domain. (b) Public evaluation cohort. The comparison uses 215 cases shared by all four methods from the 1,200-case evaluation cohort; full estimates are in Supplementary Table 10. (c) Combined public cohort. This 312-case comparison also includes development cases. Ordinary metrics weight applicable cases equally; balanced grade accuracy weights reference grades equally. Finding contradiction rate is interpreted with finding coverage and recall. Full estimates and the HistGen-only sensitivity analysis are in Supplementary Tables 22.1 to 22.13. (Notation: arrows, preferred directions; dashed line, always predicting grade 3. Whiskers show pointwise 95% confidence intervals (Supplementary Methods section 3.10).)
Supplementary Table 22.4 Continuation: Primary public comparison, 312 shared cases. Grade results for Histological (1–3). Balanced grade accuracy equally weights represented reference grades, with conservative confidence intervals. Exact and ordinal agreement are case-average sensitivity measures. Values are percentages with pointwise 95% confidence intervals and metric-applicable n. Grading systems are reported separately.
| Metric | HistGen | HistoGPT | PathXAI-Report(core) | PathXAI-Report |
|---|---|---|---|---|
| Exact grade agreement(sensitivity) | 27.4[17.6, 39.1]n=73 | 0.0[0.0, 4.9]n=73 | 31.5[21.1, 43.4]n=73 | 43.8[32.2, 55.9]n=73 |
| Ordinal grade agreement(sensitivity) | 36.3[24.2, 49.8]n=73 | 0.7[0.0, 7.1]n=73 | 34.9[22.8, 48.6]n=73 | 52.1[38.6, 65.3]n=73 |
Supplementary Table 22.5 Continuation: Primary public comparison, 312 shared cases. Grade results for Nuclear (1–3). Balanced grade accuracy equally weights represented reference grades, with conservative confidence intervals. Exact and ordinal agreement are case-average sensitivity measures. Values are percentages with pointwise 95% confidence intervals and metric-applicable n. Grading systems are reported separately.
| Metric | HistGen | HistoGPT | PathXAI-Report(core) | PathXAI-Report |
|---|---|---|---|---|
| Balanced grade accuracy | 0.0[0.0, 84.2] | 0.0[0.0, 84.2] | 0.0[0.0, 84.2] | 0.0[0.0, 84.2] |
| n=2 | n=2 | n=2 | n=2 | |
| Exact grade agreement(sensitivity) | 0.0[0.0, 84.2] | 0.0[0.0, 84.2] | 0.0[0.0, 84.2] | 0.0[0.0, 84.2] |
| n=2 | n=2 | n=2 | n=2 | |
| Ordinal grade agreement(sensitivity) | 0.0[0.0, 88.8] | 0.0[0.0, 88.8] | 0.0[0.0, 88.8] | 0.0[0.0, 88.8] |
| n=2 | n=2 | n=2 | n=2 |
Supplementary Table 22.6 Continuation: Primary public comparison, 312 shared cases. Grade results for WHO (1–4). Balanced grade accuracy equally weights represented reference grades, with conservative confidence intervals. Exact and ordinal agreement are case-average sensitivity measures. Values are percentages with pointwise 95% confidence intervals and metric-applicable n. Grading systems are reported separately.
| Metric | HistGen | HistoGPT | PathXAI-Report(core) | PathXAI-Report |
|---|---|---|---|---|
| Balanced grade accuracy | 66.7[0.6, 87.2] | 0.0[0.0, 86.6] | 0.0[0.0, 86.6] | 0.0[0.0, 86.6] |
| n=7 | n=7 | n=7 | n=7 | |
| Exact grade agreement(sensitivity) | 28.6[3.7, 71.0] | 0.0[0.0, 41.0] | 0.0[0.0, 41.0] | 0.0[0.0, 41.0] |
| n=7 | n=7 | n=7 | n=7 | |
| Ordinal grade agreement(sensitivity) | 28.6[2.1, 77.3] | 0.0[0.0, 49.5] | 14.3[2.2, 61.8] | 4.8[0.0, 54.9] |
| n=7 | n=7 | n=7 | n=7 |
Supplementary Table 22.7 Continuation: Paired differences for PathXAI-Report minus HistGen or HistoGPT on the same applicable public cases. Differences are expressed in pp; negative values indicate lower finding contradiction rate for PathXAI-Report. Balanced grade accuracy uses histologic grades 1–3.
| Metric | Comparator | n | Difference [95% CI], pp |
|---|---|---|---|
| Cancer family match rate | HistGen | 312 | +43.3 [+36.5, +50.3] |
| Cancer family match rate | HistoGPT | 312 | +75.3 [+70.5, +79.8] |
| Finding F1 | HistGen | 256 | +28.5 [+23.0, +33.8] |
| Finding F1 | HistoGPT | 256 | +33.4 [+28.7, +37.9] |
| Finding coverage (A/D) | HistGen | 256 | +23.9 [+18.8, +29.3] |
| Finding coverage (A/D) | HistoGPT | 256 | +34.4 [+29.9, +39.1] |
| Finding recall (C/D) | HistGen | 256 | +24.5 [+19.4, +29.6] |
| Finding recall (C/D) | HistoGPT | 256 | +28.6 [+24.4, +32.9] |
| Finding contradiction rate (E/A) | HistGen | 93 | -18.0 [-28.7, -7.5] |
| Finding contradiction rate (E/A) | HistoGPT | 56 | +3.0 [-3.2, +8.8] |
| Balanced grade accuracy (histological 1–3) | HistGen | 73 | +11.2 [-2.9, +24.6] |
| Balanced grade accuracy (histological 1–3) | HistoGPT | 73 | +34.2 [+25.0, +43.3] |
Supplementary Table 22.8 Continuation: Sensitivity analysis on the 314 public cases shared by HistGen and the two PathXAI configurations. Estimates and metric-specific support use the same case-level scoring and interval construction as the four-method comparison.
| Metric | HistGen | PathXAI-Report (core) | PathXAI-Report |
|---|---|---|---|
| Cancer family match rate | 36.0[30.7, 41.6] | 74.5[69.3, 79.2] | 79.3[74.4, 83.6] |
| n=314 | n=314 | n=314 | |
| Finding F1 | 17.0[13.8, 20.6] | 45.0[40.5, 49.3] | 45.3[41.0, 49.6] |
| n=258 | n=258 | n=258 | |
| Finding coverage (A/D) | 20.8[16.9, 24.7] | 43.6[39.3, 47.7] | 44.8[40.4, 49.1] |
| n=258 | n=258 | n=258 | |
| Finding recall (C/D) | 13.6[10.6, 16.8] | 37.3[33.4, 41.3] | 37.9[33.8, 42.1] |
| n=258 | n=258 | n=258 |
Continued on next page
Supplementary Table 22.8 (continued)
| Metric | HistGen | PathXAI-Report (core) | PathXAI-Report |
|---|---|---|---|
| Finding contradiction rate(E/A) | 32.4[24.1, 40.6]n=106 | 12.6[8.9, 16.7]n=191 | 13.1[9.2, 17.3]n=194 |
| Balanced grade accuracy(histological 1–3) | 22.3[9.3, 47.7]n=74 | 21.4[11.3, 46.0]n=74 | 33.4[18.7, 57.6]n=74 |
| Diagnostic composite (cohort target) | 57.9[53.9, 61.8]n=314 | 84.8[81.9, 87.5]n=314 | 87.5[85.0, 89.7]n=314 |
| Diagnostic composite | 67.4[63.2, 71.5]n=314 | 87.1[84.4, 89.6]n=314 | 88.8[86.4, 91.1]n=314 |
| Exact diagnosis match rate | 38.2[29.6, 47.4]n=123 | 62.6[53.4, 71.2]n=123 | 65.9[56.8, 74.2]n=123 |
| Reference entity availability(reference property) | 39.2[33.7, 44.8]n=314 | 39.2[33.7, 44.8]n=314 | 39.2[33.7, 44.8]n=314 |
| Report field completeness | 68.6[65.2, 71.7]n=314 | 87.7[85.5, 89.8]n=314 | 90.2[88.4, 92.1]n=314 |
| Broad diagnostic agreement | 70.7[65.3, 75.7]n=314 | 94.9[91.9, 97.1]n=314 | 96.2[93.4, 98.0]n=314 |
| Malignancy agreement | 79.0[74.1, 83.4]n=314 | 85.0[80.6, 88.8]n=314 | 86.3[82.0, 89.9]n=314 |
| Invasion agreement | 33.6[25.7, 42.2]n=134 | 74.6[66.4, 81.7]n=134 | 81.3[73.7, 87.5]n=134 |
| Necrosis agreement | 1.8[0.2, 6.5]n=109 | 73.4[64.1, 81.4]n=109 | 65.1[55.4, 74.0]n=109 |
| Critical-positive recall | 13.5[9.8, 17.3]n=216 | 51.8[46.6, 57.1]n=216 | 51.7[46.5, 56.8]n=216 |
Supplementary Table 22.9 Continuation: Public sensitivity comparison, 314 shared cases. Grade results for Fuhrman (1–4). Balanced grade accuracy equally weights represented reference grades, with conservative confidence intervals. Exact and ordinal agreement are case-average sensitivity measures. Values are percentages with pointwise 95% confidence intervals and metric-applicable n. Grading systems are reported separately.
| Metric | HistGen | PathXAI-Report (core) | PathXAI-Report |
|---|---|---|---|
| Balanced grade accuracy | 16.7[0.1, 89.5]n=7 | 0.0[0.0, 86.6]n=7 | 0.0[0.0, 86.6]n=7 |
| Exact grade agreement(sensitivity) | 14.3[0.4, 57.9]n=7 | 0.0[0.0, 41.0]n=7 | 0.0[0.0, 41.0]n=7 |
| Ordinal grade agreement(sensitivity) | 23.8[1.4, 73.4]n=7 | 0.0[0.0, 49.5]n=7 | 0.0[0.0, 49.5]n=7 |
Supplementary Table 22.10 Continuation: Public sensitivity comparison, 314 shared cases. Grade results for Gleason (2–10). Balanced grade accuracy equally weights represented reference grades, with conservative confidence intervals. Exact and ordinal agreement are case-average sensitivity measures. Values are percentages with pointwise 95% confidence intervals and metric-applicable n. Grading systems are reported separately.
| Metric | HistGen | PathXAI-Report (core) | PathXAI-Report |
|---|---|---|---|
| Balanced grade accuracy | 0.0[0.0, 97.5]n=1 | 0.0[0.0, 97.5]n=1 | 0.0[0.0, 97.5]n=1 |
| Exact grade agreement(sensitivity) | 0.0[0.0, 97.5]n=1 | 0.0[0.0, 97.5]n=1 | 0.0[0.0, 97.5]n=1 |
| Ordinal grade agreement(sensitivity) | 0.0[0.0, 99.7]n=1 | 0.0[0.0, 99.7]n=1 | 0.0[0.0, 99.7]n=1 |
Supplementary Table 22.11 Continuation: Public sensitivity comparison, 314 shared cases. Grade results for Histological (1–3). Balanced grade accuracy equally weights represented reference grades, with conservative confidence intervals. Exact and ordinal agreement are case-average sensitivity measures. Values are percentages with pointwise 95% confidence intervals and metric-applicable n. Grading systems are reported separately.
| Metric | HistGen | PathXAI-Report (core) | PathXAI-Report |
|---|---|---|---|
| Exact grade agreement(sensitivity) | 27.0[17.4, 38.6]n=74 | 31.1[20.8, 42.9]n=74 | 43.2[31.8, 55.3]n=74 |
| Ordinal grade agreement(sensitivity) | 36.5[24.5, 49.9]n=74 | 34.5[22.5, 48.0]n=74 | 51.4[38.0, 64.5]n=74 |
Supplementary Table 22.12 Continuation: Public sensitivity comparison, 314 shared cases. Grade results for Nuclear (1–3). Balanced grade accuracy equally weights represented reference grades, with conservative confidence intervals. Exact and ordinal agreement are case-average sensitivity measures. Values are percentages with pointwise 95% confidence intervals and metric-applicable n. Grading systems are reported separately.
| Metric | HistGen | PathXAI-Report (core) | PathXAI-Report |
|---|---|---|---|
| Balanced grade accuracy | 0.0[0.0, 84.2]n=2 | 0.0[0.0, 84.2]n=2 | 0.0[0.0, 84.2]n=2 |
| Exact grade agreement(sensitivity) | 0.0[0.0, 84.2]n=2 | 0.0[0.0, 84.2]n=2 | 0.0[0.0, 84.2]n=2 |
| Ordinal grade agreement(sensitivity) | 0.0[0.0, 88.8]n=2 | 0.0[0.0, 88.8]n=2 | 0.0[0.0, 88.8]n=2 |
Supplementary Table 22.13 Continuation: Public sensitivity comparison, 314 shared cases. Grade results for WHO (1–4). Balanced grade accuracy equally weights represented reference grades, with conservative confidence intervals. Exact and ordinal agreement are case-average sensitivity measures. Values are percentages with pointwise 95% confidence intervals and metric-applicable n. Grading systems are reported separately.
| Metric | HistGen | PathXAI-Report (core) | PathXAI-Report |
|---|---|---|---|
| Balanced grade accuracy | 50.0[0.3, 90.8]n=8 | 0.0[0.0, 90.5]n=8 | 0.0[0.0, 90.5]n=8 |
| Exact grade agreement(sensitivity) | 25.0[3.2, 65.1]n=8 | 0.0[0.0, 36.9]n=8 | 0.0[0.0, 36.9]n=8 |
| Ordinal grade agreement(sensitivity) | 25.0[1.8, 71.7]n=8 | 12.5[1.9, 57.0]n=8 | 12.5[0.6, 58.9]n=8 |
2. Automated report evaluation on the private cohort
2.1. Evaluation by reference set
The primary comparison uses the 151 cases with reports from all methods in the 152-case private cohort. Reference sets P1 and P2 each contain one report per case from one of the two pathologists. Supplementary Figure 16 shows diagnostic and finding performance and selected cases. Supplementary Figure 17 compares finding coverage, report field completeness and histological-grade agreement across all ten methods; Supplementary Tables 26.1 to 26.11 give the complete estimates against each reference set and a sensitivity analysis using each method's available reports across all 152 cases. Finding comparisons with a fixed reference denominator and with identical asserted finding types are reported in Supplementary Tables 19 and 20.
The reference sets agreed on specific diagnosis in 122/127 comparable cases (), necrosis in 126/135 (), and grade in 45/75 (linear weighted ; Supplementary Table 23). Of the 30 grade disagreements, 27 were between Grade 2 and Grade 3. Comparable grades came from 74 breast cases and one colorectal case. Model performance is reported separately against P1 and P2 to retain these reference differences.
Supplementary Table 23 Agreement between private reference sets P1 and P2. Each pathologist authored a report for all 152 cases. P1 and P2 counts indicate fields with definite values; comparable cases require definite values in both reports, and grade additionally requires the same grading system. is unweighted for nominal fields and linearly weighted for histological grades 1–3, with disagreement weight . Brackets show unadjusted 95% percentile intervals from 4,000 paired-case bootstrap draws within each field's comparable cases (seed 20260831 plus the zero-based field index). Broad-diagnosis is undefined because all comparable values are carcinoma. These analyses use the existing normalized reference values without forming a consensus.
| Field | P1n | P2n | Comparablen | Matchingn (%) | [95% CI] |
|---|---|---|---|---|---|
| Broad diagnosis | 123 | 123 | 123 | 123 (100.0%) | Undefined0.939 |
| Specific diagnosis | 136 | 137 | 127 | 122 (96.1%) | [0.886, 0.987]0.951 |
| Malignancy | 145 | 149 | 145 | 143 (98.6%) | [0.875, 1.000]0.970 |
| Invasion | 144 | 147 | 140 | 139 (99.3%) | [0.892, 1.000]0.576 |
| Necrosis | 150 | 136 | 135 | 126 (93.3%) | [0.283, 0.799]0.036 |
| Grade | 76 | 76 | 75 | 45 (60.0%) | [-0.170, 0.246] |
Cancer family match rate uses 121 applicable cases against P1 (74 invasive-breast, 46 prostate and one colorectal cancer reference) and 123 against P2 (76, 46 and one, respectively). PathXAI-Report achieved 93.39% (95% CI, 87.39–97.10) and 93.50% (87.59–97.15), compared with 89.26% and 89.43% for Qwen + H&E (Fig. 2(e)). The accompanying Source Data file private_reference_cancer_compatibility.csv provides all ten methods' estimates, intervals and denominators.
For exact diagnosis matching, PathXAI-Report had fewer definite non-specific diagnoses than Qwen + H&E against P1 (20 versus 36) and P2 (16 versus 34). Different specific diagnoses occurred equally often against P1 (22 each) and slightly more often for PathXAI-Report against P2 (26 versus 24). The corresponding match counts were 91 versus 73 among 135 applicable P1 references and 92 versus 74 among 136 applicable P2 references (Source Data, diagnostic_outcomes).
2.2. Contrasting diagnostic and grade assignments
Malignant predictions in non-malignant reference cases
The existing extraction classified all 151 PathXAI-Report outputs as malignant, including all 13 reference-benign cases in each reference set; Qwen + H&E had malignant predictions in 11 of these 13 cases. Supplementary Figure 15 and Supplementary Table 24 also report borderline reference diagnoses separately. Reference-benign cases were confined to prostate and colorectal samples, and all reference-borderline cases were colorectal. Supplementary Table 25 reports all extracted categories, with missing, uncertain and conflicting predictions kept separate; organ-stratified counts are supplied in Source Data. These reference-defined comparisons identify overcalls for review; they are not an independently adjudicated estimate of clinical specificity.

Supplementary Figure 15 Malignant predictions in non-malignant reference cases. Bars show the percentage classified as malignant for all ten methods; labels give malignant predictions/reference cases. Benign and borderline categories are shown separately for P1 and P2, the two reference sets for the same private cohort. All reference-defined cases remain in the denominator, including missing, uncertain or conflicting predictions. These descriptive counts use the existing automated extraction and have not undergone independent adjudication. Detailed counts are in Supplementary Tables 24 and 25.
Supplementary Table 24 Definite malignant predictions in private cases classified as benign or borderline in each reference set. Each cell gives malignant predictions/reference cases. The denominator includes all cases in the stated reference category; missing or uncertain predictions remain in the denominator and are separately recorded in Source Data. Categories use the existing automated extraction rules and have not undergone independent adjudication. P1 and P2 concern the same 151-case cohort and must not be added as independent samples.
| Method | P1 benign | P1 borderline | P2 benign | P2 borderline |
|---|---|---|---|---|
| Qwen + H&E | 11/13 | 4/9 | 11/13 | 6/11 |
| DeepSeek + H&E | 13/13 | 8/9 | 13/13 | 9/11 |
| GLM + H&E | 3/13 | 0/9 | 3/13 | 1/11 |
| MedGemma | 9/13 | 6/9 | 8/13 | 7/11 |
| PLIP-guided Qwen | 12/13 | 7/9 | 11/13 | 9/11 |
| PRISM2 | 11/13 | 0/9 | 11/13 | 0/11 |
| HistGen | 10/13 | 9/9 | 10/13 | 11/11 |
| HistoGPT | 3/13 | 0/9 | 3/13 | 0/11 |
| PathXAI-Report (core) | 13/13 | 8/9 | 13/13 | 10/11 |
| PathXAI-Report | 13/13 | 9/9 | 13/13 | 11/11 |
Supplementary Table 25 Reference and predicted malignancy categories in the private cohort. Each cell contains counts for P1 / P2 on the same 151 cases with reports from all ten methods. Columns are extracted prediction categories; row groups are extracted reference categories. Missing, uncertain and conflicting predictions remain separate and count toward the reference-group denominator. Neither reference set has uncertain or conflicting malignancy values. Complete cross-tabulations, including zero cells and separate breast, prostate and colorectal strata, are supplied in Source Data. These are descriptive counts from the existing extraction rules, without new clinical adjudication.
| Method | Referencen | Benign | Borderline | Malignant | Missing | Uncertain | Conflict |
|---|---|---|---|---|---|---|---|
| Reference category: Benign | |||||||
| Qwen + H&E | 13 / 13 | 1 / 1 | 0 / 0 | 11 / 11 | 1 / 1 | 0 / 0 | 0 / 0 |
| DeepSeek + H&E | 13 / 13 | 0 / 0 | 0 / 0 | 13 / 13 | 0 / 0 | 0 / 0 | 0 / 0 |
| GLM + H&E | 13 / 13 | 8 / 8 | 0 / 0 | 3 / 3 | 0 / 0 | 1 / 1 | 1 / 1 |
| MedGemma | 13 / 13 | 1 / 1 | 0 / 0 | 9 / 8 | 3 / 4 | 0 / 0 | 0 / 0 |
| PLIP-guided Qwen | 13 / 13 | 0 / 0 | 0 / 0 | 12 / 11 | 1 / 2 | 0 / 0 | 0 / 0 |
| PRISM2 | 13 / 13 | 1 / 1 | 0 / 0 | 11 / 11 | 1 / 1 | 0 / 0 | 0 / 0 |
| HistGen | 13 / 13 | 0 / 0 | 0 / 0 | 10 / 10 | 3 / 3 | 0 / 0 | 0 / 0 |
| HistoGPT | 13 / 13 | 1 / 1 | 0 / 0 | 3 / 3 | 9 / 9 | 0 / 0 | 0 / 0 |
| PathXAI-Report (core) | 13 / 13 | 0 / 0 | 0 / 0 | 13 / 13 | 0 / 0 | 0 / 0 | 0 / 0 |
| PathXAI-Report | 13 / 13 | 0 / 0 | 0 / 0 | 13 / 13 | 0 / 0 | 0 / 0 | 0 / 0 |
| Reference category: Borderline | |||||||
| Qwen + H&E | 9 / 11 | 4 / 4 | 0 / 0 | 4 / 6 | 1 / 1 | 0 / 0 | 0 / 0 |
| DeepSeek + H&E | 9 / 11 | 1 / 1 | 0 / 0 | 8 / 9 | 0 / 1 | 0 / 0 | 0 / 0 |
| GLM + H&E | 9 / 11 | 5 / 6 | 0 / 0 | 0 / 1 | 1 / 1 | 1 / 1 | 2 / 2 |
| MedGemma | 9 / 11 | 0 / 0 | 0 / 0 | 6 / 7 | 3 / 4 | 0 / 0 | 0 / 0 |
| PLIP-guided Qwen | 9 / 11 | 0 / 0 | 0 / 0 | 7 / 9 | 2 / 2 | 0 / 0 | 0 / 0 |
| PRISM2 | 9 / 11 | 7 / 8 | 0 / 0 | 0 / 0 | 2 / 3 | 0 / 0 | 0 / 0 |
| HistGen | 9 / 11 | 0 / 0 | 0 / 0 | 9 / 11 | 0 / 0 | 0 / 0 | 0 / 0 |
| HistoGPT | 9 / 11 | 5 / 5 | 0 / 0 | 0 / 0 | 3 / 5 | 0 / 0 | 1 / 1 |
| PathXAI-Report (core) | 9 / 11 | 1 / 1 | 0 / 0 | 8 / 10 | 0 / 0 | 0 / 0 | 0 / 0 |
| PathXAI-Report | 9 / 11 | 0 / 0 | 0 / 0 | 9 / 11 | 0 / 0 | 0 / 0 | 0 / 0 |
| Reference category: Malignant | |||||||
| Qwen + H&E | 122 / 124 | 0 / 0 | 0 / 0 | 120 / 122 | 2 / 2 | 0 / 0 | 0 / 0 |
| DeepSeek + H&E | 122 / 124 | 1 / 1 | 1 / 1 | 117 / 119 | 0 / 0 | 3 / 3 | 0 / 0 |
| GLM + H&E | 122 / 124 | 5 / 5 | 3 / 3 | 99 / 101 | 3 / 3 | 9 / 9 | 3 / 3 |
| MedGemma | 122 / 124 | 0 / 0 | 0 / 0 | 97 / 97 | 23 / 25 | 2 / 2 | 0 / 0 |
| PLIP-guided Qwen | 122 / 124 | 0 / 0 | 0 / 0 | 112 / 113 | 10 / 11 | 0 / 0 | 0 / 0 |
| PRISM2 | 122 / 124 | 0 / 0 | 0 / 0 | 121 / 122 | 0 / 1 | 0 / 0 | 1 / 1 |
| HistGen | 122 / 124 | 0 / 0 | 0 / 0 | 104 / 106 | 17 / 17 | 0 / 0 | 1 / 1 |
| HistoGPT | 122 / 124 | 1 / 1 | 0 / 0 | 61 / 61 | 59 / 61 | 1 / 1 | 0 / 0 |
| PathXAI-Report (core) | 122 / 124 | 0 / 0 | 0 / 0 | 122 / 124 | 0 / 0 | 0 / 0 | 0 / 0 |
| PathXAI-Report | 122 / 124 | 0 / 0 | 0 / 0 | 122 / 124 | 0 / 0 | 0 / 0 | 0 / 0 |
Continued on next page
Supplementary Table 25 (continued)
| Method | Reference n | Benign | Borderline | Malignant | Missing | Uncertain | Conflict |
|---|---|---|---|---|---|---|---|
| Reference category: Missing | |||||||
| Qwen + H&E | 7 / 3 | 0 / 0 | 0 / 0 | 7 / 3 | 0 / 0 | 0 / 0 | 0 / 0 |
| DeepSeek + H&E | 7 / 3 | 0 / 0 | 0 / 0 | 6 / 3 | 1 / 0 | 0 / 0 | 0 / 0 |
| GLM + H&E | 7 / 3 | 3 / 2 | 0 / 0 | 4 / 1 | 0 / 0 | 0 / 0 | 0 / 0 |
| MedGemma | 7 / 3 | 0 / 0 | 0 / 0 | 3 / 3 | 4 / 0 | 0 / 0 | 0 / 0 |
| PLIP-guided Qwen | 7 / 3 | 0 / 0 | 0 / 0 | 5 / 3 | 2 / 0 | 0 / 0 | 0 / 0 |
| PRISM2 | 7 / 3 | 1 / 0 | 0 / 0 | 4 / 3 | 2 / 0 | 0 / 0 | 0 / 0 |
| HistGen | 7 / 3 | 0 / 0 | 0 / 0 | 6 / 2 | 1 / 1 | 0 / 0 | 0 / 0 |
| HistoGPT | 7 / 3 | 0 / 0 | 0 / 0 | 0 / 0 | 7 / 3 | 0 / 0 | 0 / 0 |
| PathXAI-Report (core) | 7 / 3 | 0 / 0 | 0 / 0 | 7 / 3 | 0 / 0 | 0 / 0 | 0 / 0 |
| PathXAI-Report | 7 / 3 | 0 / 0 | 0 / 0 | 7 / 3 | 0 / 0 | 0 / 0 | 0 / 0 |
Two cases illustrate subtype reporting and a diagnostic overcall (Supplementary Fig. 16(b)). In C035, Qwen + H&E and the core configuration also mention ductal carcinoma of no special type in summary prose. The core gives Grade 2, like PathXAI-Report and both pathologists' reports, whereas Qwen + H&E gives Grade 3. The references disagree on necrosis; PLIP-guided Qwen has no parsed final diagnosis or grade.
In the colorectal case C006, all displayed systems score zero for diagnosis and subtype against both pathologists' reports. PathXAI-Report labels colorectal adenocarcinoma, whereas the references describe a sessile serrated lesion with dysplasia or low-grade intraepithelial neoplasia. Both support a precancerous classification but differ on whether malignancy can be assessed.
(a) Diagnostic and finding agreement by reference set
| Exact diagnosis match rate ↑Pathologist 1 · n = 135 · [% [95% CI] | Exact diagnosis match rate ↑Pathologist 2 · n = 136 · [% [95% CI] | |||
|---|---|---|---|---|
| Qwen + H&E | 54.1 | 54.4 | ||
| DeepSeek + H&E | 60.0 | 55.9 | ||
| GLM + H&E | 43.0 | 43.4 | ||
| MedGemma | 3.0 | 2.9 | ||
| PLIP-guided Qwen | 32.6 | 31.6 | ||
| PRISM2 | 54.8 | 52.2 | ||
| PathXAI-Report (core) | 57.8 | 55.9 | ||
| PathXAI-Report | 67.4 | 67.6 | ||
151 shared cases · case averages · references kept separate
| Diagnostic composite ↑P1 / P2 (%) | Finding F1 ↑P1 / P2 (%) | Finding recall ↑P1 / P2 (%) | ||||
|---|---|---|---|---|---|---|
| Qwen + H&E | 72.5/72.3 | 71.6/73.3 | 68.0/70.0 | |||
| DeepSeek + H&E | 72.6/70.8 | 66.4/69.1 | 61.7/64.7 | |||
| GLM + H&E | 61.9/62.9 | 63.1/64.7 | 56.7/58.8 | |||
| MedGemma | 40.8/40.1 | 38.4/42.8 | 35.7/40.4 | |||
| PLIP-guided Qwen | 59.5/59.4 | 31.1/33.1 | 23.3/26.2 | |||
| PRISM2 | 74.4/72.3 | NA/NA | NA/NA | |||
| PathXAI-Report (core) | 74.1/73.1 | 67.3/70.9 | 64.0/67.5 | |||
| PathXAI-Report | 77.8/77.5 | 76.6/78.9 | 75.0/77.3 | |||
Paired labels and upper / lower marks: P1 / P2.
(b) Private-cohort report examples
Subtype and grade comparisons with separate pathologist references
| Pathologist references | Qwen + H&E | PLIP-guided Qwen | PathXAI-Report (core) | PathXAI-Report |
|---|---|---|---|---|
| C035 · Subtype in prose vs fields; grade differs | ||||
| P1 subtype: IDC | Invasive breast carcinoma, high grade | No parsed final diagnosis or grade fields | Invasive Breast Carcinoma Grade 2 (Intermediate) is suggested | Invasive Breast Carcinoma, No Special Type (NST) grade: Grade 2. |
| P2 subtype: Invasive ductal carcinoma | Grade 3 (Nottingham). ↑ Summary also mentions ductal NST | ↑ Summary also mentions ductal NST | ||
| P1/P2 grade: intermediate grade / grade 2 | ||||
| P1 necrosis: absent | ||||
| P2 necrosis: present | ||||
| C006 · Both-reference diagnosis/subtype failure | ||||
| P1 subtype: SSL | Colorectal adenocarcinoma | High-grade malignant neoplasm | Colorectal adenocarcinoma | colorectal adenocarcinoma |
| P2 subtype: sessile serrated lesion | ↑ Diagnostic composite and exact diagnosis | ↑ Subtype blank; | Adenocarcinoma | Subtype: adenocarcinoma. |
| ↑ Both broad types: precancerous lesion | match rate 0 vs both references | Diagnostic composite and exact diagnosis match rate 0 vs both | ↑ Subtype field | ↑ Diagnostic composite and exact diagnosis match rate 0 vs both; |
| P1 malign.: not assessable | ↑ Diagnostic composite and exact diagnosis match rate 0 vs both references | Finding F1 0; Finding contradiction rate (E/A) 1.0 | ||
| P2 malign.: borderline | ||||
Supplementary Figure 16 Automated report evaluation using two pathologist reference sets. (a) Automated report evaluation. All methods use shared cases, evaluated separately against P1 and P2. Exact diagnosis match rate includes assessable malignant and benign diagnoses. Cases receive equal weight; PRISM2 supplies diagnosis only. Available-case and grade estimates are in Supplementary Tables 26.1 to 26.11. (b) Report examples. Diagnostic specificity, grade differences and a diagnostic overall relative to both reference sets. (Notation: P1/P2, pathologists' reference sets; ↑, higher preferred. Whiskers show pointwise 95% confidence intervals (Supplementary Methods section 3.10).)
Supplementary Table 26.1 Automated report evaluation using pathologist reference sets (Fig. 2(e); detailed results in Supplementary Figs. 16 and 17). The shared-case analysis (151 cases) is primary; the method-available analysis (up to 152 cases) is a sensitivity analysis. P1 and P2 denote the two pathologists' reference sets, each containing one report per case. Results for each set and the joint estimate are separate; for the joint estimate, scores are averaged within each case before equally weighting cases. Diagnostic and finding outcomes are shown first; continuation blocks group additional field-level, content, coverage and grade outcomes. Cells show case-average estimates (%) with pointwise 95% confidence intervals and metric-applicable n; NA denotes unavailable or inapplicable values. PLIP-guided Qwen is the single-pass adaptation. Private identifiers and case-level evaluations are not included.
| Analysis | Method | Diagnostic composite | Exact diagnosis match rate | Finding F1 | Finding recall |
|---|---|---|---|---|---|
| Shared cases (151) / P1 | Qwen + H&E | 72.5 [66.6, 78.2] n=146 | 54.1 [45.3, 62.7] n=135 | 71.6 [65.9, 77.0] n=150 | 68.0 [62.3, 73.7] n=150 |
| Shared cases (151) / P1 | DeepSeek + H&E | 72.6 [66.3, 78.8] n=146 | 60.0 [51.2, 68.3] n=135 | 66.4 [61.2, 71.3] n=150 | 61.7 [56.3, 66.7] n=150 |
| Shared cases (151) / P1 | GLM + H&E | 61.9 [55.9, 67.9] n=146 | 43.0 [34.5, 51.8] n=135 | 63.1 [57.1, 68.8] n=150 | 56.7 [51.0, 62.7] n=150 |
| Shared cases (151) / P1 | MedGemma | 40.8 [35.8, 46.0] n=146 | 3.0 [0.8, 7.4] n=135 | 38.4 [33.0, 43.9] n=150 | 35.7 [30.3, 41.0] n=150 |
Continued on next page
Supplementary Table 26.1 (continued)
| Analysis | Method | Diagnostic composite | Exact diagnosis match rate | Finding F1 | Finding recall |
|---|---|---|---|---|---|
| Shared cases (151) / P1 | PLIP-guided Qwen | 59.5 [53.6, 65.5] n=146 | 32.6 [24.8, 41.2] n=135 | 31.1 [25.8, 36.4] n=150 | 23.3 [19.3, 27.3] n=150 |
| Shared cases (151) / P1 | PRISM2 | 74.4 [69.2, 79.6] n=146 | 54.8 [46.0, 63.4] n=135 | NA | NA |
| Shared cases (151) / P1 | PathXAI-Report (core) | 74.1 [68.1, 79.9] n=146 | 57.8 [49.0, 66.2] n=135 | 67.3 [62.0, 72.7] n=150 | 64.0 [58.3, 69.3] n=150 |
| Shared cases (151) / P1 | PathXAI-Report | 77.8 [71.8, 83.5] n=146 | 67.4 [58.8, 75.2] n=135 | 76.6 [71.2, 81.6] n=150 | 75.0 [69.7, 80.3] n=150 |
| Shared cases (151) / P2 | Qwen + H&E | 72.3 [66.1, 78.2] n=150 | 54.4 [45.7, 63.0] n=136 | 73.3 [67.5, 78.8] n=151 | 70.0 [64.1, 75.7] n=151 |
| Shared cases (151) / P2 | DeepSeek + H&E | 70.8 [64.4, 77.2] n=150 | 55.9 [47.1, 64.4] n=136 | 69.1 [63.8, 74.2] n=151 | 64.7 [59.5, 70.0] n=151 |
| Shared cases (151) / P2 | GLM + H&E | 62.9 [56.8, 68.9] n=150 | 43.4 [34.9, 52.1] n=136 | 64.7 [58.5, 70.5] n=151 | 58.8 [52.5, 64.8] n=151 |
| Shared cases (151) / P2 | MedGemma | 40.1 [35.0, 45.3] n=150 | 2.9 [0.8, 7.4] n=136 | 42.8 [36.9, 48.8] n=151 | 40.4 [34.7, 46.2] n=151 |
| Shared cases (151) / P2 | PLIP-guided Qwen | 59.4 [53.1, 65.7] n=150 | 31.6 [23.9, 40.1] n=136 | 33.1 [27.4, 38.6] n=151 | 26.2 [21.5, 31.1] n=151 |
| Shared cases (151) / P2 | PRISM2 | 72.3 [66.5, 77.7] n=150 | 52.2 [43.5, 60.8] n=136 | NA | NA |
| Shared cases (151) / P2 | PathXAI-Report (core) | 73.1 [66.8, 79.2] n=150 | 55.9 [47.1, 64.4] n=136 | 70.9 [65.7, 76.0] n=151 | 67.5 [62.5, 72.7] n=151 |
| Shared cases (151) / P2 | PathXAI-Report | 77.5 [71.2, 83.5] n=150 | 67.6 [59.1, 75.4] n=136 | 78.9 [73.7, 83.6] n=151 | 77.3 [72.1, 82.3] n=151 |
| Shared cases (151) / joint | Qwen + H&E | 73.0 [67.1, 78.6] n=146 | 56.3 [46.0, 66.3] n=126 | 72.7 [67.0, 77.8] n=150 | 69.2 [63.9, 74.5] n=150 |
| Shared cases (151) / joint | DeepSeek + H&E | 72.4 [65.9, 78.4] n=146 | 60.3 [50.0, 70.0] n=126 | 68.0 [63.2, 72.7] n=150 | 63.4 [58.4, 68.5] n=150 |
| Shared cases (151) / joint | GLM + H&E | 62.6 [56.6, 68.4] n=146 | 45.2 [35.2, 55.6] n=126 | 64.1 [58.3, 69.6] n=150 | 57.9 [52.3, 63.7] n=150 |
| Shared cases (151) / joint | MedGemma | 41.0 [35.8, 46.1] n=146 | 3.2 [0.7, 8.7] n=126 | 40.8 [35.1, 46.4] n=150 | 38.2 [32.8, 43.5] n=150 |
| Shared cases (151) / joint | PLIP-guided Qwen | 59.9 [53.6, 65.9] n=146 | 34.1 [24.9, 44.4] n=126 | 32.2 [26.7, 37.6] n=150 | 24.8 [20.7, 29.2] n=150 |
| Shared cases (151) / joint | PRISM2 | 74.2 [68.8, 79.3] n=146 | 55.6 [45.2, 65.6] n=126 | NA | NA |
| Shared cases (151) / joint | PathXAI-Report (core) | 74.2 [68.1, 79.9] n=146 | 57.9 [47.6, 67.8] n=126 | 69.2 [64.1, 74.2] n=150 | 65.8 [60.6, 71.1] n=150 |
| Shared cases (151) / joint | PathXAI-Report | 78.3 [72.2, 83.9] n=146 | 69.8 [59.8, 78.7] n=126 | 77.8 [72.8, 82.6] n=150 | 76.2 [71.2, 81.1] n=150 |
| Available cases (up to 152) / P1 | Qwen + H&E | 72.0 [65.9, 77.9] n=147 | 53.7 [44.9, 62.3] n=136 | 71.4 [65.6, 76.8] n=151 | 67.9 [62.3, 73.5] n=151 |
| Available cases (up to 152) / P1 | DeepSeek + H&E | 72.1 [65.6, 78.3] n=147 | 59.6 [50.8, 67.9] n=136 | 66.0 [60.8, 71.0] n=151 | 61.3 [56.0, 66.6] n=151 |
| Available cases (up to 152) / P1 | GLM + H&E | 61.9 [55.7, 67.9] n=146 | 43.0 [34.5, 51.8] n=135 | 63.1 [57.1, 68.7] n=150 | 56.7 [51.0, 62.7] n=150 |
| Available cases (up to 152) / P1 | MedGemma | 40.5 [35.2, 45.7] n=147 | 2.9 [0.8, 7.4] n=136 | 38.2 [32.7, 43.6] n=151 | 35.4 [30.1, 40.4] n=151 |
| Available cases (up to 152) / P1 | PLIP-guided Qwen | 59.1 [52.8, 65.1] n=147 | 32.4 [24.6, 40.9] n=136 | 30.9 [25.6, 36.2] n=151 | 23.2 [19.2, 27.2] n=151 |
| Available cases (up to 152) / P1 | PRISM2 | 74.4 [68.9, 79.5] n=147 | 55.1 [46.4, 63.7] n=136 | NA | NA |
| Available cases (up to 152) / P1 | PathXAI-Report (core) | 73.6 [67.3, 79.6] n=147 | 57.4 [48.6, 65.8] n=136 | 66.9 [61.4, 72.2] n=151 | 63.6 [57.9, 68.9] n=151 |
| Available cases (up to 152) / P1 | PathXAI-Report | 77.2 [71.0, 83.2] n=147 | 66.9 [58.3, 74.7] n=136 | 76.0 [70.8, 81.0] n=151 | 74.5 [68.9, 79.5] n=151 |
| Available cases (up to 152) / P2 | Qwen + H&E | 71.8 [65.6, 77.7] n=151 | 54.0 [45.3, 62.6] n=137 | 73.1 [67.4, 78.6] n=152 | 69.8 [64.0, 75.5] n=152 |
| Available cases (up to 152) / P2 | DeepSeek + H&E | 70.4 [63.8, 76.2] n=151 | 55.5 [46.7, 64.0] n=137 | 68.6 [63.3, 73.7] n=152 | 64.3 [59.0, 69.6] n=152 |
| Available cases (up to 152) / P2 | GLM + H&E | 62.9 [56.9, 69.0] n=150 | 43.4 [34.9, 52.1] n=136 | 64.7 [58.5, 70.6] n=151 | 58.8 [52.8, 64.9] n=151 |
| Available cases (up to 152) / P2 | MedGemma | 39.9 [34.8, 45.0] n=151 | 2.9 [0.8, 7.3] n=137 | 42.5 [36.3, 48.7] n=152 | 40.1 [34.5, 45.9] n=152 |
| Available cases (up to 152) / P2 | PLIP-guided Qwen | 59.0 [52.7, 65.0] n=151 | 31.4 [23.7, 39.9] n=137 | 32.9 [27.2, 38.4] n=152 | 26.0 [21.4, 30.9] n=152 |
| Available cases (up to 152) / P2 | PRISM2 | 72.2 [66.7, 77.4] n=151 | 52.6 [43.9, 61.1] n=137 | NA | NA |
Continued on next page
Supplementary Table 26.1 (continued)
| Analysis | Method | Diagnostic composite | Exact diagnosis match rate | Finding F1 | Finding recall |
|---|---|---|---|---|---|
| Available cases (up to 152) / P2 | PathXAI-Report (core) | 72.6 [66.5, 78.4] n=151 | 55.5 [46.7, 64.0] n=137 | 70.5 [65.2, 75.6] n=152 | 67.1 [61.8, 72.3] n=152 |
| Available cases (up to 152) / P2 | PathXAI-Report | 76.9 [70.5, 82.8] n=151 | 67.2 [58.6, 74.9] n=137 | 78.4 [73.2, 83.2] n=152 | 76.8 [71.4, 81.9] n=152 |
| Available cases (up to 152) / joint | Qwen + H&E | 72.5 [66.6, 78.3] n=147 | 55.9 [45.6, 65.9] n=127 | 72.5 [67.1, 77.7] n=151 | 69.1 [63.4, 74.6] n=151 |
| Available cases (up to 152) / joint | DeepSeek + H&E | 71.9 [65.5, 77.9] n=147 | 59.8 [49.5, 69.6] n=127 | 67.5 [62.6, 72.4] n=151 | 63.0 [58.0, 68.0] n=151 |
| Available cases (up to 152) / joint | GLM + H&E | 62.6 [56.7, 68.6] n=146 | 45.2 [35.2, 55.6] n=126 | 64.1 [58.4, 69.6] n=150 | 57.9 [52.2, 63.6] n=150 |
| Available cases (up to 152) / joint | MedGemma | 40.7 [35.6, 45.7] n=147 | 3.1 [0.7, 8.6] n=127 | 40.5 [34.9, 46.0] n=151 | 37.9 [32.7, 43.4] n=151 |
| Available cases (up to 152) / joint | PLIP-guided Qwen | 59.5 [53.4, 65.3] n=147 | 33.9 [24.7, 44.0] n=127 | 32.0 [26.7, 37.5] n=151 | 24.7 [20.7, 29.1] n=151 |
| Available cases (up to 152) / joint | PRISM2 | 74.2 [68.9, 79.2] n=147 | 55.9 [45.6, 65.9] n=127 | NA | NA |
| Available cases (up to 152) / joint | PathXAI-Report (core) | 73.7 [67.6, 79.6] n=147 | 57.5 [47.2, 67.4] n=127 | 68.7 [63.5, 73.8] n=151 | 65.4 [60.2, 70.6] n=151 |
| Available cases (up to 152) / joint | PathXAI-Report | 77.8 [71.7, 83.7] n=147 | 69.3 [59.2, 78.2] n=127 | 77.3 [72.2, 82.1] n=151 | 75.7 [70.5, 80.4] n=151 |
Supplementary Table 26.2 Private finding coverage and finding contradiction rate. The primary comparison uses 151 shared cases, with P1 and P2 evaluated separately. Cells give percentages with pointwise 95% confidence intervals and metric-applicable n. Finding coverage is the fraction of reference-documented finding types for which a definite present/absent assertion is made; finding contradiction rate is the fraction of these assertions that conflict with the reference. Its denominator varies by method. PRISM2 supplies diagnosis only.
| Reference | Method | Finding coverage (A/D) | Finding contradiction rate (E/A) |
|---|---|---|---|
| P1 | Qwen + H&E | 79.0 [73.7, 84.0] n=150 | 14.5 [9.8, 19.6] n=138 |
| P1 | DeepSeek + H&E | 78.7 [74.0, 83.3] n=150 | 19.7 [14.8, 24.6] n=142 |
| P1 | GLM + H&E | 63.3 [57.7, 69.0] n=150 | 10.9 [6.2, 16.0] n=128 |
| P1 | MedGemma | 63.0 [56.0, 69.3] n=150 | 41.6 [35.0, 48.2] n=113 |
| P1 | PLIP-guided Qwen | 30.7 [26.7, 34.7] n=150 | 23.1 [14.3, 31.9] n=91 |
| P1 | PRISM2 | NA | NA |
| P1 | PathXAI-Report (core) | 84.3 [80.0, 88.3] n=150 | 24.5 [18.7, 30.3] n=147 |
| P1 | PathXAI-Report | 92.7 [89.3, 95.7] n=150 | 18.7 [13.9, 24.1] n=147 |
| P2 | Qwen + H&E | 78.0 [72.4, 83.1] n=151 | 10.6 [6.7, 14.9] n=135 |
| P2 | DeepSeek + H&E | 78.9 [74.1, 83.7] n=151 | 17.4 [12.7, 22.3] n=143 |
| P2 | GLM + H&E | 64.1 [58.4, 69.8] n=151 | 9.1 [4.7, 13.8] n=127 |
| P2 | MedGemma | 62.7 [55.7, 69.3] n=151 | 35.1 [28.4, 41.9] n=111 |
| P2 | PLIP-guided Qwen | 32.3 [27.7, 37.1] n=151 | 20.2 [12.4, 28.1] n=89 |
| P2 | PRISM2 | NA | NA |
| P2 | PathXAI-Report (core) | 84.1 [79.7, 88.3] n=151 | 19.0 [14.2, 24.0] n=145 |
| P2 | PathXAI-Report | 91.5 [88.1, 94.6] n=151 | 16.2 [11.8, 21.3] n=148 |
Supplementary Table 26.3 Private-reference ordinary report metrics, primary 151 shared cases, P1. General-purpose VLMs + H&E. Values are equal-case percentages with pointwise 95% confidence intervals and metric-applicable n. Reference entity availability describes the reference. Private ROUGE-1 and ROUGE-2 estimates are unavailable and are shown as NA; PRISM2 supplies diagnosis only.
| Metric | Qwen + H&E | DeepSeek + H&E | GLM + H&E |
|---|---|---|---|
| Broad diagnostic agreement | 98.4 [94.2, 99.8] n=123 | 95.1 [89.7, 98.2] n=123 | 84.6 [76.9, 90.4] n=123 |
Continued on next page
Supplementary Table 26.3 (continued)
| Metric | Qwen + H&E | DeepSeek + H&E | GLM + H&E |
|---|---|---|---|
| Malignancy agreement | 84.0 [77.0, 89.6]n=144 | 81.2 [73.9, 87.3]n=144 | 74.3 [66.4, 81.2]n=144 |
| Invasion agreement | 67.8 [59.5, 75.4]n=143 | 76.9 [69.1, 83.6]n=143 | 67.1 [58.8, 74.8]n=143 |
| Necrosis agreement | 68.5 [60.3, 75.8]n=149 | 47.7 [39.4, 56.0]n=149 | 47.7 [39.4, 56.0]n=149 |
| Compatible grade coverage | 30.3 [20.2, 41.9]n=76 | 53.9 [42.1, 65.5]n=76 | 84.2 [74.0, 91.6]n=76 |
| Reference entity availability | 89.4 [83.4, 93.8]n=151 | 89.4 [83.4, 93.8]n=151 | 89.4 [83.4, 93.8]n=151 |
| Report field completeness | 83.7 [81.2, 86.3]n=151 | 85.1 [82.2, 88.0]n=151 | 76.6 [72.6, 80.6]n=151 |
| Critical-positive recall | 77.9 [70.4, 85.0]n=120 | 90.0 [84.6, 95.0]n=120 | 74.2 [66.2, 81.7]n=120 |
| ROUGE-1 F1 | NA | NA | NA |
| ROUGE-2 F1 | NA | NA | NA |
Supplementary Table 26.4 Private-reference ordinary report metrics, primary 151 shared cases, P1. Medical and pathology models. Values are equal-case percentages with pointwise 95% confidence intervals and metric-applicable n. Reference entity availability describes the reference. Private ROUGE-1 and ROUGE-2 estimates are unavailable and are shown as NA; PRISM2 supplies diagnosis only.
| Metric | MedGemma | PLIP-guided Qwen | PRISM2 |
|---|---|---|---|
| Broad diagnostic agreement | 74.0 [65.3, 81.5]n=123 | 91.1 [84.6, 95.5]n=123 | 100.0 [97.0, 100.0]n=123 |
| Malignancy agreement | 68.1 [59.8, 75.6]n=144 | 77.8 [70.1, 84.3]n=144 | 84.7 [77.8, 90.2]n=144 |
| Invasion agreement | 55.9 [47.4, 64.2]n=143 | 48.3 [39.8, 56.8]n=143 | NA |
| Necrosis agreement | 18.1 [12.3, 25.3]n=149 | 0.7 [0.0, 3.7]n=149 | NA |
| Compatible grade coverage | 44.7 [33.3, 56.6]n=76 | 92.1 [83.6, 97.0]n=76 | NA |
| Reference entity availability | 89.4 [83.4, 93.8]n=151 | 89.4 [83.4, 93.8]n=151 | 89.4 [83.4, 93.8]n=151 |
| Report field completeness | 68.4 [63.6, 72.9]n=151 | 66.1 [62.0, 70.0]n=151 | NA |
| Critical-positive recall | 65.0 [56.7, 73.3]n=120 | 55.0 [46.2, 63.3]n=120 | NA |
| ROUGE-1 F1 | NA | NA | NA |
| ROUGE-2 F1 | NA | NA | NA |
Supplementary Table 26.5 Private-reference ordinary report metrics, primary 151 shared cases, P1. PathXAI. Values are equal-case percentages with pointwise 95% confidence intervals and metric-applicable n. Reference entity availability describes the reference. Private ROUGE-1 and ROUGE-2 estimates are unavailable and are shown as NA; PRISM2 supplies diagnosis only.
| Metric | PathXAI-Report (core) | PathXAI-Report |
|---|---|---|
| Broad diagnostic agreement | 100.0 [97.0, 100.0]n=123 | 100.0 [97.0, 100.0]n=123 |
| Malignancy agreement | 84.7 [77.8, 90.2]n=144 | 84.7 [77.8, 90.2]n=144 |
| Invasion agreement | 74.1 [66.1, 81.1]n=143 | 79.7 [72.2, 86.0]n=143 |
| Necrosis agreement | 55.7 [47.3, 63.8]n=149 | 71.8 [63.9, 78.9]n=149 |
| Compatible grade coverage | 36.8 [26.1, 48.7]n=76 | 77.6 [66.6, 86.4]n=76 |
| Reference entity availability | 89.4 [83.4, 93.8]n=151 | 89.4 [83.4, 93.8]n=151 |
| Report field completeness | 87.6 [85.5, 89.6]n=151 | 94.6 [92.8, 96.3]n=151 |
| Critical-positive recall | 88.3 [82.5, 93.8]n=120 | 94.6 [90.4, 98.3]n=120 |
| ROUGE-1 F1 | NA | NA |
| ROUGE-2 F1 | NA | NA |
| 151 shared cases · %• P1 filled ○ P2 openP1 upper · P2 lower | Finding coverage †n (P1/P2): 150/151 | Report field completeness †n (P1/P2): 151/151 | Balanced grade accuracy †Histological · n: 76/76 |
|---|---|---|---|
| Qwen + H&E | |||
| DeepSeek + H&E | |||
| GLM + H&E | |||
| MedGemma | |||
| PLIP-guided Qwen | |||
| PRISM2 | NA | NA | NA |
| HistGen | |||
| HistoGPT | |||
| PathXAI-Report (core) | |||
| PathXAI-Report |
Percent, 95% CI. Dashed grade line: always grade 3 (33.3%). PRISM2: diagnosis only (NA).
Supplementary Figure 17 Private-cohort report coverage and grade accuracy. Methods use shared cases and separate pathologist reference sets. Finding coverage concerns documented binary findings; report field completeness concerns applicable structured fields. Balanced grade accuracy weights histological grades equally, counting missing or incompatible predictions as incorrect. These measures are inapplicable to PRISM2's diagnosis-only outputs. Non-skin cases fall outside HistoGPT's dermatopathology domain. Definitions and full estimates are in Supplementary Methods section 3.7 and Supplementary Tables 26.1 to 26.11. (Notation: filled upper marks, P1; outlined lower marks, P2; NA, not applicable; dashed line, always predicting grade 3. Bars extend from zero to the estimate; whiskers show pointwise 95% confidence intervals.)
Supplementary Table 26.6 Private-reference ordinary report metrics, primary 151 shared cases, P2. General-purpose VLMs + H&E. Values are equal-case percentages with pointwise 95% confidence intervals and metric-applicable n. Reference entity availability describes the reference. Private ROUGE-1 and ROUGE-2 estimates are unavailable and are shown as NA; PRISM2 supplies diagnosis only.
| Metric | Qwen + H&E | DeepSeek + H&E | GLM + H&E |
|---|---|---|---|
| Broad diagnostic agreement | 98.4 [94.2, 99.8]n=123 | 95.1 [89.7, 98.2]n=123 | 84.6 [76.9, 90.4]n=123 |
| Malignancy agreement | 83.1 [76.1, 88.8]n=148 | 80.4 [73.1, 86.5]n=148 | 73.6 [65.8, 80.5]n=148 |
| Invasion agreement | 67.8 [59.6, 75.3]n=146 | 76.7 [69.0, 83.3]n=146 | 67.8 [59.6, 75.3]n=146 |
| Necrosis agreement | 70.4 [61.9, 77.9]n=135 | 48.9 [40.2, 57.6]n=135 | 50.4 [41.6, 59.1]n=135 |
| Compatible grade coverage | 31.6 [21.4, 43.3]n=76 | 53.9 [42.1, 65.5]n=76 | 84.2 [74.0, 91.6]n=76 |
| Reference entity availability | 90.1 [84.1, 94.3]n=151 | 90.1 [84.1, 94.3]n=151 | 90.1 [84.1, 94.3]n=151 |
| Report field completeness | 83.9 [81.2, 86.4]n=151 | 85.3 [82.3, 88.0]n=151 | 78.1 [74.0, 81.9]n=151 |
| Critical-positive recall | 77.5 [70.1, 84.4]n=122 | 88.9 [83.2, 93.9]n=122 | 74.6 [66.8, 81.6]n=122 |
| ROUGE-1 F1 | NA | NA | NA |
| ROUGE-2 F1 | NA | NA | NA |
Supplementary Table 26.7 Private-reference ordinary report metrics, primary 151 shared cases, P2. Medical and pathology models. Values are equal-case percentages with pointwise 95% confidence intervals and metric-applicable n. Reference entity availability describes the reference. Private ROUGE-1 and ROUGE-2 estimates are unavailable and are shown as NA; PRISM2 supplies diagnosis only.
| Metric | MedGemma | PLIP-guided Qwen | PRISM2 |
|---|---|---|---|
| Broad diagnostic agreement | 74.0 [65.3, 81.5]n=123 | 91.1 [84.6, 95.5]n=123 | 100.0 [97.0, 100.0]n=123 |
| Malignancy agreement | 66.2 [58.0, 73.8]n=148 | 76.4 [68.7, 82.9]n=148 | 83.1 [76.1, 88.8]n=148 |
| Invasion agreement | 54.8 [46.4, 63.0]n=146 | 47.9 [39.6, 56.4]n=146 | NA |
| Necrosis agreement | 19.3 [13.0, 26.9]n=135 | 0.7 [0.0, 4.1]n=135 | NA |
| Compatible grade coverage | 44.7 [33.3, 56.6]n=76 | 92.1 [83.6, 97.0]n=76 | NA |
| Reference entity availability | 90.1 [84.1, 94.3]n=151 | 90.1 [84.1, 94.3]n=151 | 90.1 [84.1, 94.3]n=151 |
| Report field completeness | 67.2 [62.5, 71.8]n=151 | 67.9 [63.6, 71.8]n=151 | NA |
Continued on next page
Supplementary Table 26.7 (continued)
| Metric | MedGemma | PLIP-guided Qwen | PRISM2 |
|---|---|---|---|
| Critical-positive recall | 64.3 [55.7, 72.5]n=122 | 52.5 [44.3, 60.7]n=122 | NA |
| ROUGE-1 F1 | NA | NA | NA |
| ROUGE-2 F1 | NA | NA | NA |
Supplementary Table 26.8 Private-reference ordinary report metrics, primary 151 shared cases, P2. PathXAI. Values are equal-case percentages with pointwise 95% confidence intervals and metric-applicable n. Reference entity availability describes the reference. Private ROUGE-1 and ROUGE-2 estimates are unavailable and are shown as NA; PRISM2 supplies diagnosis only.
| Metric | PathXAI-Report (core) | PathXAI-Report |
|---|---|---|
| Broad diagnostic agreement | 100.0 [97.0, 100.0]n=123 | 100.0 [97.0, 100.0]n=123 |
| Malignancy agreement | 83.8 [76.8, 89.3]n=148 | 83.8 [76.8, 89.3]n=148 |
| Invasion agreement | 74.0 [66.1, 80.9]n=146 | 79.5 [72.0, 85.7]n=146 |
| Necrosis agreement | 57.0 [48.2, 65.5]n=135 | 74.1 [65.8, 81.2]n=135 |
| Compatible grade coverage | 38.2 [27.2, 50.0]n=76 | 78.9 [68.1, 87.5]n=76 |
| Reference entity availability | 90.1 [84.1, 94.3]n=151 | 90.1 [84.1, 94.3]n=151 |
| Report field completeness | 87.9 [85.8, 89.7]n=151 | 94.6 [93.0, 96.2]n=151 |
| Critical-positive recall | 87.3 [81.6, 92.6]n=122 | 94.3 [89.8, 98.0]n=122 |
| ROUGE-1 F1 | NA | NA |
| ROUGE-2 F1 | NA | NA |
Supplementary Table 26.9 Private-reference grade results (Supplementary Tables 26.1 to 26.11 continued), reported separately for reference sets P1 and P2 on the primary shared cases; no joint-reference grade estimate is formed. The primary balanced grade accuracy equally weights represented reference grades, with conservative 95% confidence intervals. Case-average exact grade agreement and grade macro-F1 are sensitivity summaries. n is the number of metric-applicable cases.
| Reference | Method | System | Balanced grade accuracy [95% CI] | n | Case-average exact grade agreement | Grade macro-F1 |
|---|---|---|---|---|---|---|
| P1 | Qwen + H&E | Histological (1–3) | 13.0 [3.9, 57.7] | 76 | 17.1 | 18.3 |
| P1 | DeepSeek + H&E | Histological (1–3) | 21.2 [9.2, 66.0] | 76 | 26.3 | 23.2 |
| P1 | GLM + H&E | Histological (1–3) | 27.2 [14.1, 72.5] | 76 | 40.8 | 32.4 |
| P1 | MedGemma | Histological (1–3) | 18.1 [8.6, 60.4] | 76 | 15.8 | 14.8 |
| P1 | PLIP-guided Qwen | Histological (1–3) | 31.7 [23.9, 66.5] | 76 | 26.3 | 14.7 |
| P1 | PathXAI-Report (core) | Histological (1–3) | 17.1 [6.5, 62.3] | 76 | 23.7 | 23.7 |
| P1 | PathXAI-Report | Histological (1–3) | 28.1 [16.4, 72.9] | 76 | 48.7 | 31.3 |
| P2 | Qwen + H&E | Histological (1–3) | 20.4 [7.1, 62.8] | 76 | 19.7 | 23.4 |
| P2 | DeepSeek + H&E | Histological (1–3) | 36.3 [21.6, 70.3] | 76 | 28.9 | 28.0 |
| P2 | GLM + H&E | Histological (1–3) | 47.2 [19.3, 82.2] | 76 | 48.7 | 42.2 |
| P2 | MedGemma | Histological (1–3) | 23.6 [11.0, 61.3] | 76 | 13.2 | 14.1 |
| P2 | PLIP-guided Qwen | Histological (1–3) | 33.3 [23.1, 62.5] | 76 | 17.1 | 10.4 |
| P2 | PathXAI-Report (core) | Histological (1–3) | 24.6 [10.0, 66.5] | 76 | 25.0 | 28.1 |
| P2 | PathXAI-Report | Histological (1–3) | 42.7 [25.7, 83.2] | 76 | 63.2 | 44.4 |
Supplementary Table 26.10 Private-reference ordinal grade agreement sensitivity, primary 151 shared cases with P1 and P2 reported separately. Values are case-average percentages with pointwise 95% confidence intervals and metric-applicable n; no joint-reference grade estimate is formed.
| Reference | Method | System | Ordinal grade agreement [95% CI] |
|---|---|---|---|
| P1 | Qwen + H&E | Histological (1–3) | 23.7 [13.8, 36.2]n=76 |
| P1 | DeepSeek + H&E | Histological (1–3) | 39.5 [27.5, 52.5]n=76 |
| P1 | GLM + H&E | Histological (1–3) | 61.2 [48.9, 72.3]n=76 |
Continued on next page
Supplementary Table 26.10 (continued)
| Reference | Method | System | Ordinal grade agreement [95% CI] |
|---|---|---|---|
| P1 | MedGemma | Histological (1–3) | 30.3 [19.7, 42.8]n=76 |
| P1 | PLIP-guided Qwen | Histological (1–3) | 57.9 [47.3, 67.6]n=76 |
| P1 | PathXAI-Report (core) | Histological (1–3) | 30.3 [19.2, 43.4]n=76 |
| P1 | PathXAI-Report | Histological (1–3) | 63.2 [50.3, 74.7]n=76 |
| P2 | Qwen + H&E | Histological (1–3) | 25.7 [15.4, 38.4]n=76 |
| P2 | DeepSeek + H&E | Histological (1–3) | 40.1 [28.0, 53.3]n=76 |
| P2 | GLM + H&E | Histological (1–3) | 66.4 [54.0, 77.2]n=76 |
| P2 | MedGemma | Histological (1–3) | 28.9 [18.8, 41.2]n=76 |
| P2 | PLIP-guided Qwen | Histological (1–3) | 52.6 [42.9, 62.0]n=76 |
| P2 | PathXAI-Report (core) | Histological (1–3) | 31.6 [20.3, 44.7]n=76 |
| P2 | PathXAI-Report | Histological (1–3) | 71.1 [58.1, 81.9]n=76 |
Supplementary Table 26.11 Paired exact diagnosis match rate comparisons for the joint P1/P2 shared-reference analysis (126 common metric-applicable cases). Differences are PathXAI-Report minus comparator, in pp with paired case-bootstrap 95% intervals; positive values indicate a higher exact diagnosis match rate for PathXAI-Report. All other private paired comparisons are available in Source Data.
| Comparator | Metric | n | Difference [95% CI] |
|---|---|---|---|
| Qwen + H&E | Exact diagnosis match rate | 126 | 13.5 [5.6, 21.4] |
| DeepSeek + H&E | Exact diagnosis match rate | 126 | 9.5 [0.8, 18.3] |
| GLM + H&E | Exact diagnosis match rate | 126 | 24.6 [13.9, 35.7] |
| MedGemma | Exact diagnosis match rate | 126 | 66.7 [57.9, 74.6] |
| PLIP-guided Qwen | Exact diagnosis match rate | 126 | 35.7 [27.0, 44.5] |
| PRISM2 | Exact diagnosis match rate | 126 | 14.3 [4.0, 24.6] |
| PathXAI-Report (core) | Exact diagnosis match rate | 126 | 11.9 [4.8, 19.0] |
2.3. Comparisons with HistGen and HistoGPT
The HistGen/HistoGPT comparison uses the same 151 cases and separate reference sets (Supplementary Fig. 18); full estimates and the 152-case sensitivity analysis appear in Supplementary Tables 27.1 to 27.8. PathXAI-Report achieved higher cancer family match rate, exact diagnosis match rate, finding F1 and finding recall than both report generators against each reference set.
(a) Comparison against separate pathologist references
| 151 shared cases · %• P1 filled ○ P2 openValues: P1 / P2 | Cancer family match rate ↑n (P1/P2): 121/123 | Exact diagnosis match rate ↑n (P1/P2): 135/136 | Finding F1 ↑n (P1/P2): 150/151 | Finding recall ↑n (P1/P2): 150/151 | Finding contradiction rate ↓n varies |
|---|---|---|---|---|---|
| HistGen | 8.3 / 8.1 | 5.2 / 5.1 | 21.2 / 21.5 | 16.0 / 16.9 | 22.1 / 26.2 |
| HistoGPT | 0.0 / 0.0 | 0.0 / 0.0 | 9.2 / 9.5 | 7.3 / 7.6 | 51.2 / 50.0 |
| PathXAI-Report (core) | 93.4 / 93.5 | 57.8 / 55.9 | 67.3 / 70.9 | 64.0 / 67.5 | 24.5 / 19.0 |
| PathXAI-Report | 93.4 / 93.5 | 67.4 / 67.6 | 76.6 / 78.9 | 75.0 / 77.3 | 18.7 / 16.2 |
Supplementary Figure 18 Automated report evaluation against dedicated report generators on shared private cases. (a) Diagnostic and morphological comparison. All methods use the same 151 shared cases, evaluated separately against reference sets P1 and P2. Cancer family match rate uses definite cancer-family diagnoses; exact diagnosis match rate also includes applicable benign diagnoses. Finding contradiction rate is interpreted with finding coverage and recall. Non-skin cases are outside HistoGPT's dermatopathology development domain. Finding coverage, grading results and the 152-case sensitivity analysis are in Supplementary Tables 27.1 to 27.8; cancer family match estimates are in Source Data, private_reference_cancer_compatibility.csv. (Notation: P1/P2, pathologists' reference sets; filled/open marks, P1/P2. Bars show point estimates; whiskers show pointwise 95% confidence intervals. Axis ranges vary.)
Supplementary Table 27.1 Automated report evaluation against dedicated report generators (Supplementary Fig. 18; detailed results in Supplementary Fig. 17) using each pathologist's reference set, 151-case comparison with reports from all methods. P1 and P2 denote the two pathologists' reference sets. Estimates are separate by set and not pooled. Reference entity availability describes the reference. TCGA cohort-target metrics are inapplicable to these private references; ROUGE and compatible grade coverage are unavailable for this native comparison. Ordinary values are equal-case means with pointwise 95% confidence intervals and metric-applicable n. Balanced histological-grade accuracy equally weights represented reference grades, with conservative confidence intervals.
| Metric | Reference | HistGen | HistoGPT | PathXAI-Report (core) | PathXAI-Report |
|---|---|---|---|---|---|
| Exact diagnosis match rate | P1 | 5.2 | 0.0 | 57.8 | 67.4 |
| [2.1, 10.4] | [0.0, 2.7] | [49.0, 66.2] | [58.8, 75.2] | ||
| n=135 | n=135 | n=135 | n=135 | ||
| Finding F1 | P1 | 21.2 | 9.2 | 67.3 | 76.6 |
| [16.3, 26.1] | [5.6, 13.2] | [62.0, 72.7] | [71.2, 81.6] | ||
| n=150 | n=150 | n=150 | n=150 | ||
| Finding coverage (A/D) | P1 | 20.7 | 14.7 | 84.3 | 92.7 |
| [16.7, 24.7] | [10.7, 18.7] | [80.0, 88.3] | [89.3, 95.7] | ||
| n=150 | n=150 | n=150 | n=150 | ||
| Finding recall (C/D) | P1 | 16.0 | 7.3 | 64.0 | 75.0 |
| [12.3, 19.7] | [4.3, 10.7] | [58.3, 69.3] | [69.7, 80.3] | ||
| n=150 | n=150 | n=150 | n=150 | ||
| Finding contradiction rate (E/A) | P1 | 22.1 | 51.2 | 24.5 | 18.7 |
| [12.3, 32.8] | [36.2, 66.2] | [18.7, 30.3] | [13.9, 24.1] | ||
| n=61 | n=40 | n=147 | n=147 | ||
| Balanced grade accuracy (histological 1–3) | P1 | 14.9 | 0.0 | 17.1 | 28.1 |
| [6.1, 57.8] | [0.0, 40.0] | [6.5, 62.3] | [16.4, 72.9] | ||
| Diagnostic composite | P1 | n=76 | n=76 | n=76 | n=76 |
| 28.8 | 24.0 | 74.1 | 77.8 | ||
| [24.3, 33.3] | [19.2, 28.8] | [68.1, 79.9] | [71.8, 83.5] | ||
| Reference entity availability (reference property) | P1 | n=146 | n=146 | n=146 | n=146 |
| 89.4 | 89.4 | 89.4 | 89.4 | ||
| [83.4, 93.8] | [83.4, 93.8] | [83.4, 93.8] | [83.4, 93.8] | ||
| Report field completeness | P1 | n=151 | n=151 | n=151 | n=151 |
| 45.9 | 25.7 | 87.6 | 94.6 | ||
| [41.4, 50.0] | [22.1, 29.5] | [85.5, 89.6] | [92.8, 96.3] | ||
| Broad diagnostic agreement | P1 | n=151 | n=151 | n=151 | n=151 |
| 38.2 | 44.7 | 100.0 | 100.0 | ||
| [29.6, 47.4] | [35.7, 53.9] | [97.0, 100.0] | [97.0, 100.0] | ||
| Malignancy agreement | P1 | n=123 | n=123 | n=123 | n=123 |
| 72.2 | 43.1 | 84.7 | 84.7 | ||
| [64.2, 79.4] | [34.8, 51.6] | [77.8, 90.2] | [77.8, 90.2] | ||
| Invasion agreement | P1 | n=144 | n=144 | n=144 | n=144 |
| 23.8 | 14.0 | 74.1 | 79.7 | ||
| [17.1, 31.6] | [8.8, 20.8] | [66.1, 81.1] | [72.2, 86.0] | ||
| Necrosis agreement | P1 | n=143 | n=143 | n=143 | n=143 |
| 9.4 | 1.3 | 55.7 | 71.8 | ||
| [5.2, 15.3] | [0.2, 4.8] | [47.3, 63.8] | [63.9, 78.9] | ||
| Critical-positive recall | P1 | n=149 | n=149 | n=149 | n=149 |
| 26.2 | 16.7 | 88.3 | 94.6 | ||
| [18.8, 33.8] | [10.0, 23.3] | [82.5, 93.8] | [90.4, 98.3] | ||
| n=120 | n=120 | n=120 | n=120 |
Supplementary Table 27.2 Continuation: Private reference set P1, 151-case comparison with reports from all methods. Grade results for Histological (1–3). Balanced grade accuracy equally weights represented reference grades, with conservative confidence intervals. Exact and ordinal agreement are case-average sensitivity measures. Values are percentages with pointwise 95% confidence intervals and metric-applicable n. Grading systems are reported separately.
| Metric | HistGen | HistoGPT | PathXAI-Report (core) | PathXAI-Report |
|---|---|---|---|---|
| Exact grade agreement (sensitivity) | 13.2 | 0.0 | 23.7 | 48.7 |
| [6.5, 22.9] | [0.0, 4.7] | [14.7, 34.8] | [37.0, 60.4] | |
| n=76 | n=76 | n=76 | n=76 | |
| Ordinal grade agreement (sensitivity) | 23.0 | 0.0 | 30.3 | 63.2 |
| [13.5, 35.3] | [0.0, 5.6] | [19.2, 43.4] | [50.3, 74.7] | |
| n=76 | n=76 | n=76 | n=76 |
Supplementary Table 27.3 Continuation: Automated report evaluation against dedicated report generators (Supplementary Fig. 18; detailed results in Supplementary Fig. 17) using each pathologist's reference set, 151-case comparison with reports from all methods. P1 and P2 denote the two pathologists' reference sets. Estimates are separate by set and not pooled. Reference entity availability describes the reference. TCGA cohort-target metrics are inapplicable to these private references; ROUGE and compatible grade coverage are unavailable for this native comparison. Ordinary values are equal-case means with pointwise 95% confidence intervals and metric-applicable n. Balanced histological-grade accuracy equally weights represented reference grades, with conservative confidence intervals.
| Metric | Reference | HistGen | HistoGPT | PathXAI-Report (core) | PathXAI-Report |
|---|---|---|---|---|---|
| Exact diagnosis match rate | P2 | 5.1[2.1, 10.3]n=136 | 0.0[0.0, 2.7]n=136 | 55.9[47.1, 64.4]n=136 | 67.6[59.1, 75.4]n=136 |
| Finding F1 | P2 | 21.5[16.3, 26.6]n=151 | 9.5[6.0, 13.6]n=151 | 70.9[65.7, 76.0]n=151 | 78.9[73.7, 83.6]n=151 |
| Finding coverage (A/D) | P2 | 22.0[17.8, 26.4]n=151 | 14.8[10.9, 18.8]n=151 | 84.1[79.7, 88.3]n=151 | 91.5[88.1, 94.6]n=151 |
| Finding recall (C/D) | P2 | 16.9[12.9, 21.2]n=151 | 7.6[4.6, 10.9]n=151 | 67.5[62.5, 72.7]n=151 | 77.3[72.1, 82.3]n=151 |
| Finding contradiction rate (E/A) | P2 | 26.2[15.9, 36.5]n=63 | 50.0[35.0, 65.0]n=40 | 19.0[14.2, 24.0]n=145 | 16.2[11.8, 21.3]n=148 |
| Balanced grade accuracy (histological 1–3) | P2 | 10.8[2.2, 52.5]n=76 | 0.0[0.0, 39.4]n=76 | 24.6[10.0, 66.5]n=76 | 42.7[25.7, 83.2]n=76 |
| Diagnostic composite | P2 | 28.9[24.5, 33.7]n=150 | 23.9[19.0, 28.9]n=150 | 73.1[66.8, 79.2]n=150 | 77.5[71.2, 83.5]n=150 |
| Reference entity availability (reference property) | P2 | 90.1[84.1, 94.3]n=151 | 90.1[84.1, 94.3]n=151 | 90.1[84.1, 94.3]n=151 | 90.1[84.1, 94.3]n=151 |
| Report field completeness | P2 | 47.7[43.5, 52.0]n=151 | 26.1[22.3, 30.1]n=151 | 87.9[85.8, 89.7]n=151 | 94.6[93.0, 96.2]n=151 |
| Broad diagnostic agreement | P2 | 38.2[29.6, 47.4]n=123 | 44.7[35.7, 53.9]n=123 | 100.0[97.0, 100.0]n=123 | 100.0[97.0, 100.0]n=123 |
| Malignancy agreement | P2 | 71.6[63.6, 78.7]n=148 | 41.9[33.8, 50.3]n=148 | 83.8[76.8, 89.3]n=148 | 83.8[76.8, 89.3]n=148 |
| Invasion agreement | P2 | 24.0[17.3, 31.7]n=146 | 14.4[9.1, 21.1]n=146 | 74.0[66.1, 80.9]n=146 | 79.5[72.0, 85.7]n=146 |
| Necrosis agreement | P2 | 8.9[4.7, 15.0]n=135 | 0.7[0.0, 4.1]n=135 | 57.0[48.2, 65.5]n=135 | 74.1[65.8, 81.2]n=135 |
| Critical-positive recall | P2 | 25.4[18.0, 33.2]n=122 | 16.0[9.8, 22.5]n=122 | 87.3[81.6, 92.6]n=122 | 94.3[89.8, 98.0]n=122 |
Supplementary Table 27.4 Continuation: Private reference set P2, 151-case comparison with reports from all methods. Grade results for Histological (1–3). Balanced grade accuracy equally weights represented reference grades, with conservative confidence intervals. Exact and ordinal agreement are case-average sensitivity measures. Values are percentages with pointwise 95% confidence intervals and metric-applicable n. Grading systems are reported separately.
| Metric | HistGen | HistoGPT | PathXAI-Report (core) | PathXAI-Report |
|---|---|---|---|---|
| Exact grade agreement (sensitivity) | 6.6[2.2, 14.7]n=76 | 0.0[0.0, 4.7]n=76 | 25.0[15.8, 36.3]n=76 | 63.2[51.3, 73.9]n=76 |
| Ordinal grade agreement (sensitivity) | 19.7[11.5, 31.1]n=76 | 0.0[0.0, 5.6]n=76 | 31.6[20.3, 44.7]n=76 | 71.1[58.1, 81.9]n=76 |
Supplementary Table 27.5 Continuation: Automated report evaluation against dedicated report generators (Supplementary Fig. 18; detailed results in Supplementary Fig. 17) using each pathologist's reference set, sensitivity analysis using each method's available reports across 152 cases. P1 and P2 denote the two pathologists' reference sets. Estimates are separate by set and not pooled. Reference entity availability describes the reference. TCGA cohort-target metrics are inapplicable to these private references; ROUGE and compatible grade coverage are unavailable for this native comparison. Ordinary values are equal-case means with pointwise 95% confidence intervals and metric-applicable n. Balanced histological-grade accuracy equally weights represented reference grades, with conservative confidence intervals.
| Metric | Reference | HistGen | HistoGPT | PathXAI-Report (core) | PathXAI-Report |
|---|---|---|---|---|---|
| Exact diagnosis match rate | P1 | 5.1[2.1, 10.3]n=136 | 0.0[0.0, 2.7]n=136 | 57.4[48.6, 65.8]n=136 | 66.9[58.3, 74.7]n=136 |
| Finding F1 | P1 | 21.1[16.2, 25.9]n=151 | 9.2[5.6, 13.1]n=151 | 66.9[61.4, 72.2]n=151 | 76.0[70.8, 81.0]n=151 |
| Finding coverage (A/D) | P1 | 20.9[16.9, 25.2]n=151 | 14.6[10.6, 18.9]n=151 | 84.4[80.5, 88.4]n=151 | 92.7[89.4, 95.7]n=151 |
| Finding recall (C/D) | P1 | 15.9[12.3, 19.5]n=151 | 7.3[4.3, 10.6]n=151 | 63.6[57.9, 68.9]n=151 | 74.5[68.9, 79.5]n=151 |
| Finding contradiction rate (E/A) | P1 | 23.4[12.9, 33.9]n=62 | 51.2[36.2, 66.2]n=40 | 25.0[19.6, 30.7]n=148 | 19.3[14.2, 24.7]n=148 |
| Balanced grade accuracy (histological 1–3) | P1 | 14.9[6.1, 57.8]n=76 | 0.0[0.0, 40.0]n=76 | 17.1[6.5, 62.3]n=76 | 28.1[16.4, 72.9]n=76 |
| Diagnostic composite | P1 | 28.6[24.2, 33.0]n=147 | 23.9[19.2, 28.7]n=147 | 73.6[67.3, 79.6]n=147 | 77.2[71.0, 83.2]n=147 |
| Reference entity availability (reference property) | P1 | 89.5[83.5, 93.9]n=152 | 89.5[83.5, 93.9]n=152 | 89.5[83.5, 93.9]n=152 | 89.5[83.5, 93.9]n=152 |
| Report field completeness | P1 | 45.9[41.9, 50.1]n=152 | 25.5[21.8, 29.2]n=152 | 87.6[85.6, 89.7]n=152 | 94.6[92.9, 96.3]n=152 |
| Broad diagnostic agreement | P1 | 38.2[29.6, 47.4]n=123 | 44.7[35.7, 53.9]n=123 | 100.0[97.0, 100.0]n=123 | 100.0[97.0, 100.0]n=123 |
| Malignancy agreement | P1 | 71.7[63.7, 78.9]n=145 | 42.8[34.6, 51.2]n=145 | 84.1[77.2, 89.7]n=145 | 84.1[77.2, 89.7]n=145 |
| Invasion agreement | P1 | 23.6[16.9, 31.4]n=144 | 13.9[8.7, 20.6]n=144 | 73.6[65.6, 80.6]n=144 | 79.2[71.6, 85.5]n=144 |
| Necrosis agreement | P1 | 9.3[5.2, 15.2]n=150 | 1.3[0.2, 4.7]n=150 | 55.3[47.0, 63.4]n=150 | 71.3[63.4, 78.4]n=150 |
| Critical-positive recall | P1 | 26.2[19.2, 33.8]n=120 | 16.7[10.0, 23.3]n=120 | 88.3[82.5, 93.8]n=120 | 94.6[90.4, 98.3]n=120 |
Supplementary Table 27.6 Continuation: Private reference set P1, sensitivity analysis using each method's available reports across 152 cases. Grade results for Histological (1–3). Balanced grade accuracy equally weights represented reference grades, with conservative confidence intervals. Exact and ordinal agreement are case-average sensitivity measures. Values are percentages with pointwise 95% confidence intervals and metric-applicable n. Grading systems are reported separately.
| Metric | HistGen | HistoGPT | PathXAI-Report (core) | PathXAI-Report |
|---|---|---|---|---|
| Exact grade agreement (sensitivity) | 13.2[6.5, 22.9]n=76 | 0.0[0.0, 4.7]n=76 | 23.7[14.7, 34.8]n=76 | 48.7[37.0, 60.4]n=76 |
| Ordinal grade agreement (sensitivity) | 23.0[13.5, 35.3]n=76 | 0.0[0.0, 5.6]n=76 | 30.3[19.2, 43.4]n=76 | 63.2[50.3, 74.7]n=76 |
Supplementary Table 27.7 Continuation: Automated report evaluation against dedicated report generators (Supplementary Fig. 18; detailed results in Supplementary Fig. 17) using each pathologist's reference set, sensitivity analysis using each method's available reports across 152 cases. P1 and P2 denote the two pathologists' reference sets. Estimates are separate by set and not pooled. Reference entity availability describes the reference. TCGA cohort-target metrics are inapplicable to these private references; ROUGE and compatible grade coverage are unavailable for this native comparison. Ordinary values are equal-case means with pointwise 95% confidence intervals and metric-applicable n. Balanced histological-grade accuracy equally weights represented reference grades, with conservative confidence intervals.
| Metric | Reference | HistGen | HistoGPT | PathXAI-Report (core) | PathXAI-Report |
|---|---|---|---|---|---|
| Exact diagnosis match rate | P2 | 5.1[2.1, 10.2]n=137 | 0.0[0.0, 2.7]n=137 | 55.5[46.7, 64.0]n=137 | 67.2[58.6, 74.9]n=137 |
| Finding F1 | P2 | 21.4[16.3, 26.8]n=152 | 9.4[5.8, 13.5]n=152 | 70.5[65.2, 75.6]n=152 | 78.4[73.2, 83.2]n=152 |
| Finding coverage (A/D) | P2 | 22.1[17.9, 26.8]n=152 | 14.7[10.5, 18.9]n=152 | 84.2[79.8, 88.4]n=152 | 91.6[88.2, 94.7]n=152 |
| Finding recall (C/D) | P2 | 16.8[12.8, 21.1]n=152 | 7.6[4.6, 10.9]n=152 | 67.1[61.8, 72.3]n=152 | 76.8[71.4, 81.9]n=152 |
| Finding contradiction rate (E/A) | P2 | 27.3[16.4, 38.3]n=64 | 50.0[35.0, 65.0]n=40 | 19.5[14.6, 24.4]n=146 | 16.8[12.1, 21.5]n=149 |
| Balanced grade accuracy (histological 1–3) | P2 | 10.8[2.2, 52.5]n=76 | 0.0[0.0, 39.4]n=76 | 24.6[10.0, 66.5]n=76 | 42.7[25.7, 83.2]n=76 |
| Diagnostic composite | P2 | 28.7[24.3, 33.5]n=151 | 23.8[19.0, 28.6]n=151 | 72.6[66.5, 78.4]n=151 | 76.9[70.5, 82.8]n=151 |
| Reference entity availability (reference property) | P2 | 90.1[84.2, 94.4]n=152 | 90.1[84.2, 94.4]n=152 | 90.1[84.2, 94.4]n=152 | 90.1[84.2, 94.4]n=152 |
| Report field completeness | P2 | 47.7[43.6, 51.7]n=152 | 25.9[22.1, 29.6]n=152 | 88.0[86.0, 90.0]n=152 | 94.7[92.9, 96.2]n=152 |
| Broad diagnostic agreement | P2 | 38.2[29.6, 47.4]n=123 | 44.7[35.7, 53.9]n=123 | 100.0[97.0, 100.0]n=123 | 100.0[97.0, 100.0]n=123 |
| Malignancy agreement | P2 | 71.1[63.2, 78.3]n=149 | 41.6[33.6, 50.0]n=149 | 83.2[76.2, 88.8]n=149 | 83.2[76.2, 88.8]n=149 |
| Invasion agreement | P2 | 23.8[17.2, 31.5]n=147 | 14.3[9.1, 21.0]n=147 | 73.5[65.6, 80.4]n=147 | 78.9[71.4, 85.2]n=147 |
| Necrosis agreement | P2 | 8.8[4.6, 14.9]n=136 | 0.7[0.0, 4.0]n=136 | 56.6[47.9, 65.1]n=136 | 73.5[65.3, 80.7]n=136 |
| Critical-positive recall | P2 | 25.4[18.0, 33.2]n=122 | 16.0[9.8, 22.1]n=122 | 87.3[81.6, 92.6]n=122 | 94.3[90.2, 98.0]n=122 |
Supplementary Table 27.8 Continuation: Private reference set P2, sensitivity analysis using each method's available reports across 152 cases. Grade results for Histological (1–3). Balanced grade accuracy equally weights represented reference grades, with conservative confidence intervals. Exact and ordinal agreement are case-average sensitivity measures. Values are percentages with pointwise 95% confidence intervals and metric-applicable n. Grading systems are reported separately.
| Metric | HistGen | HistoGPT | PathXAI-Report (core) | PathXAI-Report |
|---|---|---|---|---|
| Exact grade agreement (sensitivity) | 6.6[2.2, 14.7]n=76 | 0.0[0.0, 4.7]n=76 | 25.0[15.8, 36.3]n=76 | 63.2[51.3, 73.9]n=76 |
| Ordinal grade agreement (sensitivity) | 19.7[11.5, 31.1]n=76 | 0.0[0.0, 5.6]n=76 | 31.6[20.3, 44.7]n=76 | 71.1[58.1, 81.9]n=76 |
3. Pathologist ranking and correction assessment and report-content checks
3.1. Report preference, corrections and field coverage
Supplementary Figure 19 and Supplementary Table 28 report preference, correction categories, original concern flags and report-content checks for all 264 ratings per method.
The two readers differed in both correction requirements and relative report preference. Reader 1 rated 97 of 132 PathXAI-Report reports as needing no or only minor correction (73.5%), compared with 74 for the core method (56.1%) and 70 for Qwen + H&E (53.0%). Reader 2 gave this rating to 123 PathXAI-Report reports (93.2%), 122 core reports (92.4%) and 123 Qwen + H&E reports (93.2%). Reader 1 assigned lower mean ranks to the core method and Qwen + H&E (1.80 and 1.80) than to PathXAI-Report (1.92), whereas Reader 2 assigned the lowest mean rank to PathXAI-Report (1.36, versus 1.40 for core and 1.46 for Qwen + H&E).
Correction-category agreement was limited, with linear weighted ranging from 0.017 to 0.077 across methods (Supplementary Table 29). Reader 1 assigned no correction to 0–1 reports per method, compared with 103–119 for Reader 2. For the five-method preference rankings, mean Kendall was 0.52 (95% CI, 0.46–0.57) across 123 cases with estimable rankings; 9 cases had all methods tied by at least one reader.
On the same 132 reader-assessed cases, MedGemma received no/minor-correction ratings in 232/264 assessments (87.9%), whereas its cancer family match rate was 14/132 (10.6%) and exact diagnosis match rate was 4/99 (4.0%) (Supplementary Table 30). Among its no/minor ratings with applicable targets, 27/232 were linked to a matching cancer family and 7/168 to a matching exact diagnosis. The original Diagnosis fields contained only “carcinoma” in 57 reports and “neoplasm” in 32; these broad labels did not meet the cancer-family matching rules. Thus, a low correction requirement did not ensure diagnostic agreement.
PathXAI-Report more often combined a no/minor-correction rating with complete field coverage than PathXAI-Report (core) or Qwen + H&E. Because reports can require few corrections while leaving fields unanswered, this analysis combined the rating with checks for output failure and definite answers to applicable diagnostic, grade, invasion and necrosis fields (Supplementary Methods sections 4.2 and 4.3 and Supplementary Table 28). Reports met all three criteria in 61.7% of PathXAI-Report assessments (163/264 of all assessments; 95% CI, 54.2–69.3), versus 37.5% for PathXAI-Report (core), 34.5% for Qwen + H&E and 31.1% for MedGemma (82/264; 23.1–39.0). The complementary failure rates were 38.3% for PathXAI-Report and 68.9% for MedGemma, counting overlapping failures once. The field check measured whether fields were answered, not whether answers were correct; clinically appropriate abstentions also counted as incomplete. These automated checks used the original ratings without additional pathologist review.
3.2. Observed output-screening findings
Among the reviewed texts, none was empty and no recognized diagnosis section was empty. The output check identified one MedGemma report with “not specified” and no Qwen + H&E report explicitly stating that no diagnosis was generated. Ten PLIP-guided Qwen reports lacked a recognized diagnosis heading and were flagged for format review. This alone did not count as a missing diagnosis; the screen did not assess whether their provisional narrative impressions provided an adequate final diagnosis (Supplementary Methods section 4.3).
Supplementary Table 28 Pathologist ranking and correction assessment (Fig. 3(a)); detailed results in Supplementary Fig. 19) covers the same 132 aligned cases assessed by two pathologists (264 ratings per method); re-review left the original ratings unchanged. Rank is 1 (best) to 5; other estimates are percentages. Here, n is cases for mean rank and ratings for other outcomes. Intervals use case-cluster bootstrap. Checkbox flags in this table are reader selections, not adjudicated events. Supplementary Fig. 19(b)'s output and field-coverage checks classify the original ratings. Output-screened no/minor correction excludes empty reports, empty recognized Diagnosis fields and explicit full-field no-result/refusal statements; field-complete reports rated as requiring no/minor correction additionally provide all six reference-applicable structured fields (broad diagnosis, specific diagnosis, malignancy, grade, invasion and necrosis). Joint failure exactly complements this combined outcome, comprising a major/unusable rating, explicit output failure or any applicable field uncovered, with overlaps counted once. These checks assess whether fields are answered, not whether answers are correct or all relevant findings are reported. PLIP-guided Qwen is the single-pass adaptation.
| Outcome | n | MedGemma | Qwen + H&E | PLIP-guided Qwen | PathXAI-Report (core) | PathXAI-Report |
|---|---|---|---|---|---|---|
| Mean rank ↓ | 132 | 2.76[2.63, 2.88] | 1.63[1.53, 1.74] | 3.29[3.16, 3.41] | 1.60[1.50, 1.70] | 1.64[1.57, 1.72] |
| No correction ↑ | 264 | 41.29 | 45.08 | 39.39 | 45.08 | 45.08 |
| Minor correction | 264 | 46.59 | 28.03 | 10.23 | 29.17 | 38.26 |
| Major correction ↓ | 264 | 6.06 | 21.21 | 3.41 | 20.45 | 12.88 |
| Unusable ↓ | 264 | 6.06 | 5.68 | 46.97 | 5.30 | 3.79 |
| No / minor correction ↑ | 264 | 87.88 | 73.11 | 49.62 | 74.24 | 83.33 |
| [83.33, 92.05] | [67.80, 78.03] | [45.45, 53.79] | [69.31, 79.17] | [78.79, 87.88] | ||
| Major correction / unusable ↓ | 264 | 12.12 | 26.89 | 50.38 | 25.76 | 16.67 |
| [7.95, 16.67] | [21.97, 32.20] | [46.21, 54.55] | [20.83, 30.69] | [12.12, 21.21] | ||
| unsupported major claim ↓ | 264 | 0.38[0.00, 1.14] | 0.38[0.00, 1.14] | 0.00[0.00, 0.00] | 0.38[0.00, 1.14] | 0.00[0.00, 0.00] |
| major visible omission ↓ | 264 | 0.38[0.00, 1.14] | 0.00[0.00, 0.00] | 0.76[0.00, 1.89] | 0.00[0.00, 0.00] | 0.00[0.00, 0.00] |
| Output-screened no/minor correction ↑ | 264 | 87.12 | 73.11 | 49.62 | 74.24 | 83.33 |
| No/minor correction with complete fields ↑ | 264 | [82.58, 91.29]31.06[23.11, 39.02] | [67.80, 78.03]34.47[27.65, 41.67] | [45.45, 53.79]14.02[9.85, 18.56] | [69.31, 79.17]37.50[29.92, 44.70] | [78.79, 87.88]61.74[54.17, 69.32] |
Continued on next page
Supplementary Table 28 (continued)
| Outcome | n | MedGemma | Qwen + H&E | PLIP-guided Qwen | PathXAI-Report (core) | PathXAI-Report |
|---|---|---|---|---|---|---|
| Major/unusable or incomplete-content joint failure ↓ | 264 | 68.94[60.98, 76.89] | 65.53[58.33, 72.35] | 85.98[81.44, 90.15] | 62.50[55.30, 70.08] | 38.26[30.68, 45.83] |
Supplementary Table 29 Agreement between the two readers on correction requirements. Each method has 132 paired case ratings. Reader columns give counts in the order no correction / minor correction / major correction / unusable. Exact agreement is the percentage of cases assigned the same category. Linear weighted accounts for the ordered categories; brackets contain unadjusted 95% case-bootstrap intervals.
| Method | Reader 1 | Reader 2 | Exact agreement (%) | Weighted [95% CI] |
|---|---|---|---|---|
| MedGemma | 1 / 114 / 7 / 10 | 108 / 9 / 9 / 6 | 9.8 | 0.077[-0.007, 0.167] |
| Qwen + H&E | 1 / 69 / 52 / 10 | 118 / 5 / 4 / 5 | 6.8 | 0.057[0.002, 0.119] |
| PLIP-guided Qwen | 1 / 15 / 2 / 114 | 103 / 12 / 7 / 10 | 10.6 | 0.017[0.001, 0.036] |
| PathXAI-Report (core) | 1 / 73 / 50 / 8 | 118 / 4 / 4 / 6 | 8.3 | 0.077[0.015, 0.145] |
| PathXAI-Report | 0 / 97 / 30 / 5 | 119 / 4 / 4 / 5 | 5.3 | 0.065[0.002, 0.133] |
Supplementary Table 30 Correction ratings and automated diagnosis matching on the same 132 development cases. Values are counts/denominators (percentages). No/minor correction uses 264 case-reader ratings; all-case diagnostic matching uses reports with applicable targets (132 for cancer family and 99 for exact diagnosis). The final two columns link each report’s automated score to its no/minor ratings, so a report can contribute twice and denominators vary by method. These are descriptive cross-tabulations of the original ratings and scores.
| Method | No/minor correction | Cancer family match | Exact diagnosis match | Family match among no/minor | Exact match among no/minor |
|---|---|---|---|---|---|
| MedGemma | 232/264(87.9%) | 14/132(10.6%) | 4/99(4.0%) | 27/232(11.6%) | 7/168(4.2%) |
| 193/264(73.1%) | 102/132(77.3%) | 65/99(65.7%) | 150/193(77.7%) | 98/146(67.1%) | |
| Qwen + H&E | 131/264(49.6%) | 44/132(33.3%) | 24/99(24.2%) | 51/131(38.9%) | 30/100(30.0%) |
| PLIP-guided Qwen | 196/264(74.2%) | 104/132(78.8%) | 68/99(68.7%) | 157/196(80.1%) | 94/142(66.2%) |
| PathXAI-Report (core) | 220/264(83.3%) | 96/132(72.7%) | 60/99(60.6%) | 164/220(74.5%) | 103/162(63.6%) |
| PathXAI-Report |
4. Tissue evidence and its use in reporting
4.1. Direct-input policy comparison
The four-policy comparison uses 456 shared public cases (Supplementary Fig. 20); Supplementary Tables 31.1 to 31.2 give all estimates and applicable counts. All four receive known-site context.
H&E with tissue statistics improved diagnostic agreement over H&E alone, whereas H&E with overlays produced nearly as many new mismatches in the specific diagnosis as corrections. Tissue statistics yielded higher cancer family match rate and exact diagnosis match rate, the latter in 352 applicable cases. H&E with tissue statistics corrected 32 previously mismatched diagnoses and changed 16 correct predictions to incorrect ones among 352 applicable cases; overlays gave 29 and 27 such changes, respectively, alongside lower finding F1 than H&E alone. The diagnostic composite (cohort target) combines broad-diagnosis agreement, cancer family match rate and malignancy agreement (Supplementary Methods section 3.6). Tissue statistics increased this score; the overlay contrast had an interval including zero. Including final-summary diagnoses reduced the tissue-statistics gain in exact diagnosis match rate to 3.98 pp (95% CI, 0.00–7.95; Supplementary Table 35.2).
PathXAI-Report had higher finding agreement and report field completeness than direct tissue-statistics or overlay input. PathXAI-Report also had higher diagnostic-composite point estimates, although the interval for the comparison with tissue statistics included zero. The diagnostic-composite difference was 1.32 pp over statistics (95% CI, -0.67 to 3.33) and 3.03 pp over overlays (1.14–4.95). Its cancer family match rate gain over statistics was less precise (1.10 pp; -2.42 to 4.82). Report field completeness reached 91.51%, compared with 84.38% for statistics and 84.37% for overlays.
(a) Ranking and correction assessment with anonymous method labels

132 aligned cases · 264 reader ratings
Ratings checked and retained unchanged · no added observations
(b) Correction ratings with output and field-coverage checks
132 aligned cases × 2 pathologists = 264 ratings per method; % [95% CI]
↑ Higher is better
| Original ratingsNo / minor correction ↑ | No explicit output failure+ no / minor correction ↑ | No/minor correctionwith complete fields ↑ | |
|---|---|---|---|
| 0%50%100% | 0%50%100% | 0%50%100% | |
| ● MedGemma | 87.9 [83.3–92.0] | 87.1 [82.6–91.3] | 31.1 [23.1–39.0] |
| ■ Qwen + H&E | 73.1 [67.8–78.0] | 73.1 [67.8–78.0] | 34.5 [27.7–41.7] |
| ♦ PLIP-guided Qwen | 49.6 [45.4–53.8] | 49.6 [45.4–53.8] | 14.0 [9.8–18.6] |
| ● PathXAI-Report (core) | 74.2 [69.3–79.2] | 74.2 [69.3–79.2] | 37.5 [29.9–44.7] |
| ■ PathXAI-Report | 83.3 [78.8–87.9] | 83.3 [78.8–87.9] | 61.7 [54.2–69.3] |
Failures stay in the denominator; original ratings are unchanged.
Fields: broad diagnosis, specific diagnosis, malignancy, grade, invasion and necrosis.
Supplementary Figure 19 Pathologist ranking and correction assessment of generated reports. (a) Assessment design. Reports were presented under anonymous method labels in randomized order; prior ratings remained visible and were retained during re-review. (b) Correction ratings and content checks. Cumulative checks assess output failures and definite answers in applicable reference fields. Field coverage measures answer presence, not correctness. Checks retain all original ratings and weights without additional pathologist ratings. Procedures are in Supplementary Methods sections 4.2 and 4.3; rating categories and concern flags are in Supplementary Table 28. (Notation: arrows, preferred directions. Whiskers show unadjusted 95% case-cluster bootstrap intervals, retaining both readers and all methods.)
Supplementary Table 31.1 Four-policy public comparison (Supplementary Figs. 20(b) to 20(e)), 456 shared public cases. Ordinary estimates weight applicable cases equally; histological-grade estimates weight represented reference grades equally. Percentages have pointwise 95% confidence intervals; interval construction follows Supplementary Methods section 3.10. n is metric-applicable cases. Reference entity availability describes the reference, not model performance.
| Metric | Qwen + H&E | H&E + tissue statistics | H&E + segmentation overlays | PathXAI-Report |
|---|---|---|---|---|
| Exact diagnosis match rate | 61.6 [56.3, 66.8]n=352 | 66.2 [61.0, 71.1]n=352 | 62.2 [56.9, 67.3]n=352 | 66.2 [61.0, 71.1]n=352 |
| Diagnostic composite (cohort target) | 82.3 [79.7, 84.9]n=456 | 84.6 [82.0, 87.0]n=456 | 82.9 [80.3, 85.3]n=456 | 85.9 [83.7, 88.1]n=456 |
| Cancer family match rate | 71.5 [67.1, 75.6]n=456 | 75.7 [71.5, 79.5]n=456 | 71.1 [66.7, 75.2]n=456 | 76.8 [72.6, 80.6]n=456 |
| Broad diagnostic agreement | 90.8 [87.8, 93.3]n=456 | 92.1 [89.2, 94.4]n=456 | 92.5 [89.7, 94.8]n=456 | 93.6 [91.0, 95.7]n=456 |
| Malignancy agreement | 87.9 [84.6, 90.8]n=456 | 87.9 [84.6, 90.8]n=456 | 87.9 [84.6, 90.8]n=456 | 89.3 [86.0, 91.9]n=456 |
| Invasion agreement | 64.8 [58.6, 70.7]n=253 | 57.3 [51.0, 63.5]n=253 | 59.3 [53.0, 65.4]n=253 | 74.3 [68.5, 79.6]n=253 |
| Necrosis agreement | 54.2 [44.8, 63.4]n=118 | 62.7 [53.3, 71.4]n=118 | 52.5 [43.1, 61.8]n=118 | 75.4 [66.6, 82.9]n=118 |
| Compatible grade coverage | 30.9 [24.4, 38.0]n=191 | 34.0 [27.3, 41.2]n=191 | 40.8 [33.8, 48.2]n=191 | 71.2 [64.2, 77.5]n=191 |
| Reference entity availability | 77.2 [73.1, 81.0]n=456 | 77.2 [73.1, 81.0]n=456 | 77.2 [73.1, 81.0]n=456 | 77.2 [73.1, 81.0]n=456 |
| Report field completeness | 84.4 [82.6, 86.1]n=456 | 84.4 [82.7, 86.0]n=456 | 84.4 [82.6, 86.0]n=456 | 91.5 [90.2, 92.8]n=456 |
| Finding F1 | 40.6 [37.2, 44.1]n=408 | 37.8 [34.5, 41.2]n=408 | 37.2 [33.9, 40.6]n=408 | 45.5 [42.0, 49.0]n=408 |
| Critical-positive recall | 48.5 [43.7, 53.0]n=316 | 44.7 [40.2, 49.1]n=316 | 42.1 [37.5, 46.5]n=316 | 57.5 [53.1, 61.9]n=316 |
| Finding coverage (A/D) | 41.4 [38.2, 44.8]n=408 | 37.6 [34.4, 40.8]n=408 | 38.7 [35.4, 42.0]n=408 | 45.0 [41.6, 48.4]n=408 |
| Finding recall (C/D) | 33.5 [30.4, 36.8]n=408 | 30.8 [27.7, 34.0]n=408 | 30.4 [27.2, 33.6]n=408 | 37.8 [34.5, 41.1]n=408 |
Continued on next page
Supplementary Table 31.1 (continued)
| Metric | Qwen + H&E | H&E + tissue statistics | H&E + segmentation overlays | PathXAI-Report |
|---|---|---|---|---|
| Finding contradiction rate(E/A) | 19.3 [15.2, 23.1]n=297 | 18.0 [14.2, 22.1]n=276 | 20.7 [16.5, 25.1]n=281 | 15.5 [12.1, 19.1]n=311 |
| ROUGE-1 F1 | 30.0 [29.5, 30.4]n=456 | 30.3 [29.8, 30.7]n=456 | 30.2 [29.7, 30.7]n=456 | 30.2 [29.8, 30.6]n=456 |
| ROUGE-2 F1 | 11.0 [10.8, 11.3]n=456 | 10.9 [10.6, 11.1]n=456 | 11.1 [10.9, 11.4]n=456 | 11.0 [10.7, 11.2]n=456 |
| Balanced grade accuracy(1-3) | 23.0 [11.7, 46.9]n=174 | 22.6 [11.5, 46.4]n=174 | 26.5 [17.9, 49.6]n=174 | 47.5 [35.1, 69.7]n=174 |
Supplementary Table 31.2 Four-policy comparison. Paired differences are target minus comparator in pp with pointwise 95% paired case-bootstrap intervals; histological-grade draws are stratified by reference grade. n is paired metric-applicable cases. All four active policy contrasts are shown for the listed report metrics.
| Contrast | Metric | n | Difference [95% CI] |
|---|---|---|---|
| H&E + tissue statistics minus Qwen + H&E | Diagnostic composite (cohort target) | 456 | 2.3 [0.6, 3.9] |
| H&E + tissue statistics minus Qwen + H&E | Cancer family match rate | 456 | 4.2 [1.1, 7.5] |
| H&E + tissue statistics minus Qwen + H&E | Exact diagnosis match rate | 352 | 4.5 [0.9, 8.5] |
| H&E + tissue statistics minus Qwen + H&E | Broad diagnostic agreement | 456 | 1.3 [-0.2, 3.1] |
| H&E + tissue statistics minus Qwen + H&E | Finding F1 | 408 | -2.8 [-6.2, 0.5] |
| H&E + tissue statistics minus Qwen + H&E | Finding coverage (A/D) | 408 | -3.8 [-7.1, -0.6] |
| H&E + tissue statistics minus Qwen + H&E | Finding recall (C/D) | 408 | -2.7 [-5.7, 0.2] |
| H&E + tissue statistics minus Qwen + H&E | Finding contradiction rate (E/A) | 251 | -2.0 [-5.4, 1.4] |
| H&E + tissue statistics minus Qwen + H&E | Balanced grade accuracy (1-3) | 174 | -0.4 [-5.3, 4.5] |
| H&E + segmentation overlays minus Qwen + H&E | Diagnostic composite (cohort target) | 456 | 0.5 [-1.4, 2.5] |
| H&E + segmentation overlays minus Qwen + H&E | Cancer family match rate | 456 | -0.4 [-4.2, 3.3] |
| H&E + segmentation overlays minus Qwen + H&E | Exact diagnosis match rate | 352 | 0.6 [-3.4, 4.8] |
| H&E + segmentation overlays minus Qwen + H&E | Broad diagnostic agreement | 456 | 1.8 [0.0, 3.7] |
| H&E + segmentation overlays minus Qwen + H&E | Finding F1 | 408 | -3.4 [-6.6, -0.2] |
| H&E + segmentation overlays minus Qwen + H&E | Finding coverage (A/D) | 408 | -2.7 [-6.1, 0.4] |
| H&E + segmentation overlays minus Qwen + H&E | Finding recall (C/D) | 408 | -3.1 [-6.0, -0.2] |
| H&E + segmentation overlays minus Qwen + H&E | Finding contradiction rate (E/A) | 252 | -0.5 [-4.5, 3.5] |
| H&E + segmentation overlays minus Qwen + H&E | Balanced grade accuracy (1-3) | 174 | 3.5 [-5.9, 11.3] |
| PathXAI-Report minus H&E + tissue statistics | Diagnostic composite (cohort target) | 456 | 1.3 [-0.7, 3.3] |
| PathXAI-Report minus H&E + tissue statistics | Cancer family match rate | 456 | 1.1 [-2.4, 4.8] |
| PathXAI-Report minus H&E + tissue statistics | Exact diagnosis match rate | 352 | 0.0 [-4.5, 4.3] |
| PathXAI-Report minus H&E + tissue statistics | Broad diagnostic agreement | 456 | 1.5 [-0.2, 3.3] |
| PathXAI-Report minus H&E + tissue statistics | Finding F1 | 408 | 7.7 [4.5, 10.8] |
| PathXAI-Report minus H&E + tissue statistics | Finding coverage (A/D) | 408 | 7.4 [4.2, 10.6] |
| PathXAI-Report minus H&E + tissue statistics | Finding recall (C/D) | 408 | 7.0 [4.0, 10.0] |
| PathXAI-Report minus H&E + tissue statistics | Finding contradiction rate (E/A) | 259 | -2.9 [-6.1, 0.5] |
| PathXAI-Report minus H&E + tissue statistics | Balanced grade accuracy (1-3) | 174 | 25.0 [13.1, 36.9] |
| PathXAI-Report minus H&E + segmentation overlays | Diagnostic composite (cohort target) | 456 | 3.0 [1.1, 5.0] |
| PathXAI-Report minus H&E + segmentation overlays | Cancer family match rate | 456 | 5.7 [2.4, 9.2] |
| PathXAI-Report minus H&E + segmentation overlays | Exact diagnosis match rate | 352 | 4.0 [-0.3, 8.0] |
| PathXAI-Report minus H&E + segmentation overlays | Broad diagnostic agreement | 456 | 1.1 [-0.9, 3.1] |
| PathXAI-Report minus H&E + segmentation overlays | Finding F1 | 408 | 8.3 [5.3, 11.5] |
| PathXAI-Report minus H&E + segmentation overlays | Finding coverage (A/D) | 408 | 6.4 [3.6, 9.3] |
| PathXAI-Report minus H&E + segmentation overlays | Finding recall (C/D) | 408 | 7.4 [4.6, 10.2] |
| PathXAI-Report minus H&E + segmentation overlays | Finding contradiction rate (E/A) | 264 | -5.8 [-9.9, -2.0] |
| PathXAI-Report minus H&E + segmentation overlays | Balanced grade accuracy (1-3) | 174 | 21.1 [13.0, 30.7] |
Sensitivity to tissue-statistics availability. Restricting the four-policy comparison to the 443 cases with an available tissue-statistics context flag changed each paired difference by less than 0.6 pp (Supplementary Table 32). For tissue statistics versus H&E alone, the cancer family match rate difference was 4.06 pp and the exact diagnosis match rate difference was 4.71 pp, compared with 4.17 and 4.55 pp in the full development subset. Both restricted diagnostic intervals excluded zero. Nonzero paired differences retained their directions; the previously zero exact-diagnosis difference between PathXAI-Report and direct tissue statistics became 0.59 pp, with an interval including zero. Source Data includes cancer-type counts and diagnostic transitions for both case sets.
(a) Four reporting policies on a shared case set
| Reporting policy | H&E | Tissue statistics | Segmentation overlays | Agent |
|---|---|---|---|---|
| H&E only | Yes | No | No | No |
| H&E + tissue statistics | Yes | Yes | No | No |
| H&E + segmentation overlays | Yes | No | Yes | No |
| PathXAI-Report | Yes | Yes | Yes | Yes |
(b) Input-policy comparison
| Cancer family match rate↑n = 456 | Diagnostic composite(cohort target) ↑n = 456 | Balanced gradeaccuracy ↑n = 174 · grades 1–3 | ||||
|---|---|---|---|---|---|---|
| H&E only | ▣H | 71.5 | ▣ | 82.3 | ▣ | 23.0 |
| H&E + tissue statistics | ▣H | 75.7 | ▣ | 84.6 | ▣ | 22.6 |
| H&E + segmentation overlays | ▣H | 71.1 | ▣ | 82.9 | ▣ | 26.5 |
| PathXAI-Report | ▣H | 76.8 | ▣ | 85.9 | ▣ | 47.5 |
Case average · score (%)
(c) Layer 1 | Direct tissue-evidence policies versus H&E
| Cancer family match rate↑n = 456 | Diagnostic composite(cohort target) ↑n = 456 | Balanced gradeaccuracy ↑n = 174 · grades 1–3 | |
|---|---|---|---|
| Tissue statistics – H&E only | +4.17 | +2.26 | -0.38 |
| Segmentation overlays – H&E only | -0.44 | +0.54 | +3.53 |
Case-average paired Δ (pp)
(d) Layer 2 | Complete reporting strategy versus direct inputs
| Cancer family match rate↑n = 456 | Diagnostic composite(cohort target) ↑n = 456 | Balanced gradeaccuracy ↑n = 174 · grades 1–3 | |
|---|---|---|---|
| PathXAI-Report – tissue statistics | +1.10 | +1.32 | +24.97 |
| PathXAI-Report – overlays | +5.70 | +3.03 | +21.06 |
Case-average paired Δ (pp)
(e) Report content, finding coverage and contradictions
| Finding F1 ↑n = 408 | Finding coverage ↑n = 408 | Finding contradiction rate ↓Method-specific n shown per row | ||||
|---|---|---|---|---|---|---|
| H&E only | ▣H | 40.6 | ▣H | 41.4 | ▣H | 19.3n = 297 |
| H&E + tissue statistics | ▣H | 37.8 | ▣H | 37.6 | ▣H | 18.0n = 276 |
| H&E + segmentation overlays | ▣H | 37.2 | ▣H | 38.7 | ▣H | 20.7n = 281 |
| PathXAI-Report | ▣H | 45.5 | ▣H | 45.0 | ▣H | 15.5n = 311 |
Case average · score (%)
Supplementary Figure 20 Tissue-input and reporting-workflow comparisons. (a) Reporting policies. Comparisons use shared cases; cases whose tissue-statistics context was marked unavailable remain included. (b) Diagnostic and grading performance. Cancer-family targets are TCGA labels; balanced grade accuracy uses three-level histological grades. (c),(d) Paired gains. Differences subtract the reference policy from the compared policy. (e) Report content. Finding contradiction rate is interpreted with finding coverage. Inapplicable reference fields are excluded; protocols are in Supplementary Methods section 3.3. (Notation: H&E, haematoxylin and eosin; ROI, region of interest; arrows, preferred directions; pp, percentage points. Whiskers show pointwise 95% confidence intervals (Supplementary Methods section 3.10). Paired contrasts use case-bootstrap intervals, stratified by reference grade for grading.)
Supplementary Table 32 Sensitivity to recorded tissue-statistics availability. Differences are the first policy minus the second, in percentage points; parentheses give metric-specific paired counts. The primary comparison retains all 456 development cases. The restricted comparison uses the same 443 cases for all policies, selected by the tissue-statistics policy's availability flag, and reports pointwise 95% paired-bootstrap intervals from 4,000 draws. Positive differences favour the first policy except for finding contradiction rate.
| Metric | All 456 cases: difference (n) | 443 flagged-available cases: difference (n); 95% CI |
|---|---|---|
| H&E + tissue statistics minus H&E only | ||
| Cancer family match rate | +4.17 (456) | +4.06 (443); [0.90, 7.22] |
| Exact diagnosis match rate | +4.55 (352) | +4.71 (340); [0.59, 8.53] |
| Finding F1 | -2.80 (408) | -2.95 (397); [-6.42, 0.41] |
| Finding recall | -2.72 (408) | -2.87 (397); [-6.00, 0.21] |
| Finding contradiction rate | -2.03 (251) | -2.10 (242); [-5.41, 1.21] |
| H&E + overlays minus H&E only | ||
| Cancer family match rate | -0.44 (456) | -0.68 (443); [-4.29, 3.16] |
| Exact diagnosis match rate | +0.57 (352) | +0.88 (340); [-3.24, 5.00] |
| Finding F1 | -3.41 (408) | -3.50 (397); [-6.66, -0.32] |
| Finding recall | -3.10 (408) | -3.22 (397); [-6.18, -0.32] |
| Finding contradiction rate | -0.46 (252) | -0.55 (244); [-4.58, 3.52] |
| PathXAI-Report minus H&E + tissue statistics | ||
| Cancer family match rate | +1.10 (456) | +1.35 (443); [-2.26, 4.97] |
| Exact diagnosis match rate | +0.00 (352) | +0.59 (340); [-3.82, 5.29] |
| Finding F1 | +7.66 (408) | +7.74 (397); [4.39, 11.01] |
| Finding recall | +7.00 (408) | +7.11 (397); [4.05, 10.45] |
| Finding contradiction rate | -2.90 (259) | -2.92 (251); [-6.31, 0.50] |
| PathXAI-Report minus H&E + overlays | ||
| Cancer family match rate | +5.70 (456) | +6.09 (443); [2.71, 9.71] |
| Exact diagnosis match rate | +3.98 (352) | +4.41 (340); [0.29, 8.53] |
| Finding F1 | +8.28 (408) | +8.29 (397); [5.25, 11.47] |
| Finding recall | +7.38 (408) | +7.45 (397); [4.59, 10.47] |
| Finding contradiction rate | -5.84 (264) | -5.89 (256); [-10.12, -1.95] |
4.2. Grade-specific outcomes of the reporting policies
The grade-agreement gain of PathXAI-Report over direct tissue statistics was largest in reference histological Grade 2 cases. Supplementary Figure 21 breaks down correct, incorrect and missing grade assignments in the same 174 applicable cases. In Grade 2, correct assignments rose from 16/65 to 53/65, including 37 cases changing from no definite grade to a correct Grade 2. Grade 1 remained poorly recovered (1/9 for both). Among reference Grade 3 cases, correct assignments increased from 32/100 to 50/100, although incorrect Grade 2 assignments increased from 9/100 to 24/100.
4.3. Report-workflow comparisons
The comparisons examine evidence organization, acquisition and writing, each using cases with reports available from all compared configurations. Supplementary Table 33 gives all estimates and applicable counts. The 42-case evidence-organization contrasts were imprecise across all plotted outcomes (Supplementary Fig. 22(b)).
Conflict-triggered expansion achieved higher balanced grade accuracy than guarded dual-path reasoning by 8.32 pp (95% CI, 3.03–13.43; 172 applicable cases). Zoom-enabled reinspection exceeded conflict-triggered expansion by 4.73 pp, with an interval spanning zero (-0.19 to 9.99; the same 172 cases; Supplementary Fig. 22(c)).
Combining knowledge, diagnostic safeguards and diagnosis-constrained writing improved grade agreement and finding F1 over writer-only grade images. The grade-agreement difference was 14.54 pp (95% CI, 9.95–19.28; 174 applicable cases). The finding-F1 difference for this combination was 2.76 pp (95% CI, 0.09–5.56; 408 applicable cases); the diagnostic-composite difference remained uncertain (Supplementary Fig. 22(d)). In the same 456 shared public cases, supplying grade-focused images only to the writer changed balanced grade accuracy by 1.62 pp relative to PathXAI-Report (core) (95% CI, -9.98 to 12.93; 174 applicable cases).
(a) H&E only

(b) H&E + tissue statistics

(c) H&E + segmentation overlays

(d) PathXAI-Report

Supplementary Figure 21 Grade predictions under four reporting policies. (a)–(d) compare H&E alone, tissue-statistics input, segmentation-overlay input and PathXAI-Report on the same cases with assessable three-level histological grades (Supplementary Methods sections 3.3 and 3.7). Rows denote reference grades and columns denote predictions; cells give counts and row percentages on a common shading scale. “No definite grade” includes missing, uncertain and conflicting outputs. “Other system” denotes incompatible grading systems, whose values do not count as correct histological grades. (Notation: H&E, haematoxylin and eosin.)
Supplementary Table 33 Report-workflow comparisons (Supplementary Fig. 22), using cases with reports from every compared policy. Panel (b), 42 cases; panel (c), 432 cases; panel (d), 456 cases. Estimates are paired case-average differences (target minus comparator) in pp with pointwise 95% intervals. Grade uses equal weighting across represented reference classes. All active contrasts and panel-specific primary metrics are included. † Bootstrap interval unavailable because the resampled case differences are constant. Interval construction follows Supplementary Methods section 3.10.
| Metric / grading system | n | Difference [95% CI] |
|---|---|---|
| Panel (b): Tissue statistics at writing only minus positive tissue statistics | ||
| Diagnostic composite (cohort target) | 42 | -3.9 [-9.8, 1.0] |
| Cancer family match rate | 42 | -7.1 [-16.7, 2.4] |
| Exact diagnosis match rate | 33 | -3.0 [-12.1, 6.1] |
| Finding F1 | 34 | -4.3 [-16.4, 8.1] |
| Balanced grade accuracy; Fuhrman (1–4) | 1 | 0.0↑ |
| Balanced grade accuracy; Histological (1–3) | 16 | 3.3 [-11.7, 25.0] |
| Panel (b): Guarded dual-path reasoning minus positive tissue statistics | ||
| Diagnostic composite (cohort target) | 42 | -0.6 [-6.9, 6.2] |
| Cancer family match rate | 42 | -2.4 [-9.5, 4.8] |
| Exact diagnosis match rate | 33 | -12.1 [-24.2, -3.0] |
| Finding F1 | 34 | -6.0 [-18.3, 5.3] |
| Balanced grade accuracy; Fuhrman (1–4) | 1 | 0.0↑ |
| Balanced grade accuracy; Histological (1–3) | 16 | 1.7 [-21.7, 25.0] |
Continued on next page
Supplementary Table 33 (continued)
| Metric / grading system | n | Difference [95% CI] |
|---|---|---|
| Panel (c): Conflict-triggered expansion minus guarded dual-path reasoning | ||
| Diagnostic composite (cohort target) | 432 | 1.5 [-0.5, 3.5] |
| Cancer family match rate | 432 | 3.5 [0.0, 7.2] |
| Finding F1 | 388 | 2.6 [-0.7, 6.0] |
| Finding coverage (A/D) | 388 | 3.1 [-0.4, 6.5] |
| Finding recall (C/D) | 388 | 2.3 [-0.9, 5.4] |
| Finding contradiction rate (E/A) | 237 | -0.8 [-4.4, 2.7] |
| Balanced grade accuracy; Fuhrman (1–4) | 12 | 0.0† |
| Balanced grade accuracy; Histological (1–3) | 172 | 8.3 [3.0, 13.4] |
| Balanced grade accuracy; Nuclear (1–3) | 1 | 0.0† |
| Balanced grade accuracy; WHO (1–4) | 3 | 0.0† |
| Panel (c): Zoom-enabled reinspection minus conflict-triggered expansion | ||
| Diagnostic composite (cohort target) | 432 | 1.2 [-0.7, 3.0] |
| Cancer family match rate | 432 | 1.9 [-1.9, 5.3] |
| Finding F1 | 388 | -0.5 [-3.5, 2.4] |
| Finding coverage (A/D) | 388 | -0.4 [-3.8, 2.7] |
| Finding recall (C/D) | 388 | -0.5 [-3.2, 2.1] |
| Finding contradiction rate (E/A) | 246 | 0.7 [-2.5, 3.9] |
| Balanced grade accuracy; Fuhrman (1–4) | 12 | 0.0† |
| Balanced grade accuracy; Histological (1–3) | 172 | 4.7 [-0.2, 10.0] |
| Balanced grade accuracy; Nuclear (1–3) | 1 | 0.0† |
| Balanced grade accuracy; WHO (1–4) | 3 | 0.0† |
| Panel (d): Report-only grade evidence minus PathXAI-Report (core) | ||
| Diagnostic composite (cohort target) | 456 | 1.4 [-0.3, 3.1] |
| Cancer family match rate | 456 | 3.3 [0.4, 6.4] |
| Exact diagnosis match rate | 352 | 2.8 [-1.1, 6.8] |
| Finding F1 | 408 | 1.2 [-1.6, 4.0] |
| Balanced grade accuracy; Fuhrman (1–4) | 12 | 0.0† |
| Balanced grade accuracy; Histological (1–3) | 174 | 1.6 [-10.0, 12.9] |
| Balanced grade accuracy; Nuclear (1–3) | 1 | 0.0† |
| Balanced grade accuracy; WHO (1–4) | 4 | 0.0† |
| Panel (d): Knowledge routing + diagnosis lock minus report-only grade evidence | ||
| Diagnostic composite (cohort target) | 456 | 1.0 [-0.7, 2.8] |
| Cancer family match rate | 456 | -0.2 [-3.3, 2.9] |
| Exact diagnosis match rate | 352 | -1.4 [-5.4, 2.6] |
| Finding F1 | 408 | 2.8 [0.1, 5.6] |
| Balanced grade accuracy; Fuhrman (1–4) | 12 | 0.0† |
| Balanced grade accuracy; Histological (1–3) | 174 | 14.5 [9.9, 19.3] |
| Balanced grade accuracy; Nuclear (1–3) | 1 | 0.0† |
| Balanced grade accuracy; WHO (1–4) | 4 | 0.0† |
Sensitivity to diagnostic-component weights. With equal component weights, PathXAI-Report retained higher diagnostic-composite point estimates than Qwen + H&E and PathXAI-Report (core) in the public evaluation cohort and using both private reference sets (Supplementary Table 34). No paired comparison reversed direction. In the development comparisons, the cohort-target difference between guarded dual-path reasoning and positive tissue statistics shifted from -0.56 pp to zero; both intervals included zero. The direct-input, acquisition and writing comparisons retained their directions. Individual diagnostic measures remain the primary outcomes.
Supplementary Table 34 Sensitivity of diagnostic-composite comparisons to component weights. Values are paired differences in percentage points, first-named method minus second, with pointwise 95% case-bootstrap intervals (4,000 resamples). The original weights for broad diagnosis, specific diagnosis and malignancy are 0.35, 0.35 and 0.15; equal weighting gives each applicable component the same weight. Both schemes renormalize within cases and use identical applicable cases and bootstrap draws. The cohort-target variant substitutes cancer family matching for specific diagnosis. Positive differences favour the first-named method. Private references are evaluated separately. Direct-input and workflow comparisons use development cases; the public and dedicated-generator evaluation comparisons use the separate evaluation cohort. Absolute scores, component counts and all method contrasts are in Source Data.
| Comparison | Cases | Original weights | Equal weights |
|---|---|---|---|
| Public evaluation cohort, reference-diagnosis composite | |||
| PathXAI-Report vs Qwen + H&E | 1200 | +1.17 [0.31, 2.08] | +1.19 [0.40, 2.03] |
| PathXAI-Report vs PathXAI-Report (core) | 1200 | +1.61 [0.83, 2.44] | +1.35 [0.65, 2.08] |
Continued on next page
Supplementary Table 34 (continued)
| Comparison | Cases | Original weights | Equal weights |
|---|---|---|---|
| Public evaluation cohort, cohort-target composite | |||
| PathXAI-Report vs Qwen + H&E | 1200 | +2.13 [0.97, 3.15] | +1.94 [1.00, 2.81] |
| PathXAI-Report vs PathXAI-Report (core) | 1200 | +2.24 [1.26, 3.22] | +1.89 [1.08, 2.72] |
| Private reference set P1, reference-diagnosis composite | |||
| PathXAI-Report vs Qwen + H&E | 146 | +5.28 [1.78, 8.80] | +4.45 [1.37, 7.42] |
| PathXAI-Report vs PathXAI-Report (core) | 146 | +3.67 [0.85, 6.49] | +2.97 [0.68, 5.25] |
| Private reference set P2, reference-diagnosis composite | |||
| PathXAI-Report vs Qwen + H&E | 150 | +5.14 [1.72, 8.47] | +4.33 [1.44, 7.22] |
| PathXAI-Report vs PathXAI-Report (core) | 150 | +4.39 [1.92, 6.87] | +3.56 [1.56, 5.56] |
| Dedicated-generator evaluation comparison, reference-diagnosis composite | |||
| PathXAI-Report vs HistGen | 215 | +16.74 [11.86, 21.79] | +14.11 [9.84, 18.61] |
| PathXAI-Report vs HistoGPT | 215 | +61.76 [56.14, 66.97] | +58.76 [53.18, 64.11] |
| Direct-input policies, cohort-target composite | |||
| H&E + tissue statistics vs Qwen + H&E | 456 | +2.26 [0.59, 3.93] | +1.83 [0.44, 3.29] |
| H&E + overlays vs Qwen + H&E | 456 | +0.54 [-1.39, 2.43] | +0.44 [-1.17, 2.05] |
| PathXAI-Report vs H&E + tissue statistics | 456 | +1.32 [-0.64, 3.38] | +1.32 [-0.37, 3.07] |
| PathXAI-Report vs H&E + overlays | 456 | +3.03 [1.17, 4.95] | +2.70 [1.10, 4.39] |
| Evidence organization, cohort-target composite | |||
| Tissue statistics at writing only vs Positive tissue statistics | 42 | -3.92 [-9.80, 0.98] | -3.17 [-7.94, 0.79] |
| Guarded dual-path reasoning vs Positive tissue statistics | 42 | -0.56 [-6.86, 6.17] | +0.00 [-5.56, 6.37] |
| Acquisition, cohort-target composite | |||
| Conflict-triggered expansion vs Guarded dual-path reasoning | 432 | +1.47 [-0.52, 3.42] | +1.23 [-0.46, 2.93] |
| Zoom-enabled reinspection vs Conflict-triggered expansion | 432 | +1.17 [-0.65, 3.01] | +1.08 [-0.46, 2.62] |
| Writing and diagnostic constraints, cohort-target composite | |||
| Writer-only grade images vs PathXAI-Report (core) | 456 | +1.41 [-0.34, 3.13] | +1.10 [-0.37, 2.56] |
| Knowledge, safeguards and diagnosis lock vs Writer-only grade images | 456 | +0.98 [-0.77, 2.74] | +0.88 [-0.66, 2.41] |
5. Sensitivity to diagnostic extraction scope
Final summaries combine diagnostic, grading and morphological statements, so disease terms are not always clearly attributable to a final diagnosis. The alternative extraction applies the same diagnostic assertion rules to these additional sections. Including final-summary diagnoses tests whether diagnostic agreement depends on the report sections used for extraction (Supplementary Table 35.2). The added text can refine a generic diagnosis or introduce a conflicting assertion, so agreement can increase or decrease. PRISM2 and PLIP-guided Qwen have no recognized summary sections in these comparisons and are unchanged. The table reports summary availability alongside score changes; these results assess sensitivity to extraction scope, not the clinical accuracy of either extraction rule.
With summary-inclusive extraction, five PathXAI-Report exact-diagnosis matches became mismatches in each public group, with no changes in the opposite direction (352 applicable development cases and 604 applicable evaluation cases). Its paired difference from Qwen + H&E was 4.83 pp in the development subset (95% CI, 0.00–9.38) and 2.48 pp in the evaluation cohort (-0.83 to 5.79); both intervals included zero. The corresponding private differences were 11.85 pp for P1 (4.44–19.26) and 11.76 pp for P2 (4.41–19.12). Private differences from core were smaller and their intervals included zero. In the direct-input comparison, the tissue-statistics difference from H&E alone was 3.98 pp (0.00–7.95).
For cancer family match rate in the combined public cohort, the summary-inclusive differences were 2.78 pp versus Qwen + H&E (95% CI, 0.66–4.89) and 0.42 pp versus DeepSeek + H&E (-1.75 to 2.66). In the public evaluation cohort alone, PathXAI-Report retained a higher rate than Qwen + H&E (2.58 pp; 0.08–5.09), but had a lower point estimate than DeepSeek + H&E; the latter paired interval included zero. The tissue-statistics versus H&E-only difference in the development subset was 3.29 pp (0.00–6.58; Supplementary Table 36.2).
(a) Agent-policy comparisons
Each arrow links a reference configuration to the compared configuration; the policy change is stated below.
Evidence organization
Each comparison uses the common evaluable cases of its component configurations.
42 paired cases
| Positive tissue statistics | Tissue statistics at writing only |
Restricts tissue summaries to report writing; also removes the positive-only summary filter.
| Positive tissue statistics | Guarded dual-path reasoning |
Adds two diagnostic candidates and guarded selection; also removes the positive-only summary filter.
Active evidence acquisition
432 paired cases
| Guarded dual-path reasoning | Conflict-triggered expansion |
Adds conflict-triggered ROI expansion, at most two rounds, and rollback.
| Conflict-triggered expansion | Zoom-enabled reinspection |
Uses standard reinspection/zoom with inherited tissue statistics.
Writing and diagnostic constraints
456 paired cases
| PathXAI-Report (core) | Grade-focused ROIs (report writing only) |
Adds grade-focused ROIs to writing only; they do not enter diagnostic branches.
| PathXAI-Report (core) + grade-focused ROIs | Knowledge routing + Diagnosis lock |
Adds KEEP, diagnostic safeguards and locked writing; these changes are evaluated together.
(b) Evidence organization
| Diagnostic composite (cohort target)Δ pp ↑ | Finding F1Δ pp ↑ | Balanced grade accuracyΔ pp ↑ | |
|---|---|---|---|
| Tissue statistics at writing only vs positive tissue statistics | -3.9; n=42 | -4.3; n=34 | +3.3; n=16 |
| Guarded dual-path reasoning vs positive tissue statistics | -0.6; n=42 | -6.0; n=34 | +1.7; n=16 |
Paired contrast: variant – reference · raw pp · 95% CI
(c) Active evidence acquisition
| Diagnostic composite (cohort target)Δ pp ↑ | Finding F1Δ pp ↑ | Balanced grade accuracyΔ pp ↑ | |
|---|---|---|---|
| Conflict-triggered expansion vs guarded dual-path reasoning | +1.5; n=432 | +2.6; n=388 | +8.3; n=172 |
| Zoom-enabled reinspection vs conflict-triggered expansion | +1.2; n=432 | -0.5; n=388 | +4.7; n=172 |
Paired contrast: variant – reference · raw pp · 95% CI
(d) Writing and diagnostic constraints
| Diagnostic composite (cohort target)Δ pp ↑ | Finding F1Δ pp ↑ | Balanced grade accuracyΔ pp ↑ | |
|---|---|---|---|
| Report-only grade evidence vs core workflow | +1.4; n=456 | +1.2; n=408 | +1.6; n=174 |
| Knowledge routing + diagnosis lock vs report-only grade evidence | +1.0; n=456 | +2.8; n=408 | +14.5; n=174 |
Paired contrast: variant – reference · raw pp · 95% CI
Supplementary Figure 22 Evidence organization, acquisition and writing-policy comparisons. (a) Policy contrasts. (b)–(d) Effects of evidence organization, acquisition and writing constraints. Contrasts within each panel use common evaluable cases. Writing-policy comparisons use the same case intersection as the input-policy comparison. The final contrast changes knowledge routing, candidate selection and diagnosis constraints together. Balanced grade accuracy uses three-level histological grading, with two represented grades in (b). Policies are defined in Supplementary Methods section 3.4; full estimates are in Source Data. (Notation: n, metric-applicable cases; arrows in (a), policy changes; pp, percentage points. Points show paired differences; whiskers show unadjusted 95% case-bootstrap intervals, stratified by reference grade for grading. Higher values are preferred.)
Supplementary Table 35.1 Exact diagnosis match rate after including recognized final summaries. Primary extraction prioritizes diagnosis sections; the alternative adds text under Final Summary or Conclusion using the same section parser, terminology and polarity rules. References and applicable cases are fixed. Percentages are case averages; changes are alternative minus primary in pp, with 95% paired case-bootstrap intervals. Added/n counts applicable reports with additional selected final-summary text beyond the primary extraction. Diagnostic assertion rules determine which disease mentions are scored. Corrected/lost counts changes from incorrect to correct and correct to incorrect. The 456 shared public cases belong to the public development subset. Private comparisons use the 151 shared cases. This sensitivity analysis does not determine which extraction scope is clinically more accurate.
| Method | Primary (%) | With summary (%) | Change, pp [95% CI] | Added/n | Corrected/ lost |
|---|---|---|---|---|---|
| Public development subset (n=352) | |||||
| Qwen + H&E | 61.65 | 59.94 | -1.70 [-3.12, -0.57] | 352/352 | 0/6 |
| DeepSeek + H&E | 62.50 | 61.08 | -1.42 [-2.84, -0.28] | 352/352 | 0/5 |
| GLM + H&E | 46.59 | 46.02 | -0.57 [-3.41, 2.27] | 352/352 | 11/13 |
| MedGemma | 3.69 | 7.39 | 3.69 [1.99, 5.68] | 349/352 | 13/0 |
| PLIP-guided Qwen | 23.86 | 23.86 | 0.00 [0.00, 0.00] | 0/352 | 0/0 |
| PRISM2 | 49.15 | 49.15 | 0.00 [0.00, 0.00] | 0/352 | 0/0 |
| PathXAI-Report (core) | 64.77 | 65.34 | 0.57 [-0.57, 1.70] | 352/352 | 3/1 |
| PathXAI-Report | 66.19 | 64.77 | -1.42 [-2.84, -0.28] | 352/352 | 0/5 |
| Public evaluation cohort (n=604) | |||||
| Qwen + H&E | 58.94 | 58.94 | 0.00 [-0.83, 0.83] | 604/604 | 3/3 |
| DeepSeek + H&E | 60.26 | 60.26 | 0.00 [-0.50, 0.50] | 603/604 | 1/1 |
| GLM + H&E | 55.96 | 53.31 | -2.65 [-4.80, -0.50] | 604/604 | 14/30 |
| MedGemma | 6.13 | 11.42 | 5.30 [3.64, 7.12] | 603/604 | 32/0 |
| PLIP-guided Qwen | 39.24 | 39.24 | 0.00 [0.00, 0.00] | 0/604 | 0/0 |
| PRISM2 | 52.65 | 52.65 | 0.00 [0.00, 0.00] | 0/604 | 0/0 |
| PathXAI-Report (core) | 58.11 | 58.11 | 0.00 [-0.66, 0.66] | 604/604 | 2/2 |
| PathXAI-Report | 62.25 | 61.42 | -0.83 [-1.66, -0.17] | 604/604 | 0/5 |
| Private reference P1 (n=135) | |||||
| Qwen + H&E | 54.07 | 54.81 | 0.74 [-2.22, 3.70] | 135/135 | 3/2 |
| DeepSeek + H&E | 60.00 | 60.00 | 0.00 [0.00, 0.00] | 134/135 | 0/0 |
| GLM + H&E | 42.96 | 42.96 | 0.00 [-4.44, 4.44] | 135/135 | 5/5 |
| MedGemma | 2.96 | 5.93 | 2.96 [0.74, 5.93] | 133/135 | 4/0 |
| PLIP-guided Qwen | 32.59 | 32.59 | 0.00 [0.00, 0.00] | 0/135 | 0/0 |
| PRISM2 | 54.81 | 54.81 | 0.00 [0.00, 0.00] | 0/135 | 0/0 |
| PathXAI-Report (core) | 57.78 | 64.44 | 6.67 [2.22, 11.85] | 135/135 | 10/1 |
| PathXAI-Report | 67.41 | 66.67 | -0.74 [-2.96, 1.48] | 135/135 | 1/2 |
| Private reference P2 (n=136) | |||||
| Qwen + H&E | 54.41 | 55.15 | 0.74 [-2.21, 4.41] | 136/136 | 3/2 |
| DeepSeek + H&E | 55.88 | 55.88 | 0.00 [0.00, 0.00] | 135/136 | 0/0 |
| GLM + H&E | 43.38 | 43.38 | 0.00 [-4.41, 4.41] | 136/136 | 5/5 |
| MedGemma | 2.94 | 5.88 | 2.94 [0.74, 5.88] | 134/136 | 4/0 |
| PLIP-guided Qwen | 31.62 | 31.62 | 0.00 [0.00, 0.00] | 0/136 | 0/0 |
| PRISM2 | 52.21 | 52.21 | 0.00 [0.00, 0.00] | 0/136 | 0/0 |
| PathXAI-Report (core) | 55.88 | 62.50 | 6.62 [2.21, 11.03] | 136/136 | 10/1 |
| PathXAI-Report | 67.65 | 66.91 | -0.74 [-2.96, 1.47] | 136/136 | 1/2 |
| Reporting policies (n=352) | |||||
| Qwen + H&E | 61.65 | 59.94 | -1.70 [-3.12, -0.57] | 352/352 | 0/6 |
| H&E + tissue statistics | 66.19 | 63.92 | -2.27 [-4.26, -0.57] | 352/352 | 2/10 |
| H&E + segmentation overlays | 62.22 | 61.65 | -0.57 [-1.70, 0.57] | 352/352 | 1/3 |
| PathXAI-Report | 66.19 | 64.77 | -1.42 [-2.84, -0.28] | 352/352 | 0/5 |
Supplementary Table 35.2 Extraction-scope sensitivity. Selected paired contrasts corresponding to the public, private and tissue-input comparisons. Differences are target minus comparator in pp. Intervals use 4,000 shared case-bootstrap draws. All method-level estimates are shown above; complete contrasts and section-recognition counts are supplied in the accompanying aggregate data.
| Comparison | n | Primary difference | With summary, difference [95% CI] |
|---|---|---|---|
| Public development subset | |||
| PathXAI-Report vs PathXAI-Report (core) | 352 | 1.42 | -0.57 [-4.55, 3.41] |
| PathXAI-Report vs Qwen + H&E | 352 | 4.55 | 4.83 [0.00, 9.38] |
| Public evaluation cohort | |||
| PathXAI-Report vs PathXAI-Report (core) | 604 | 4.14 | 3.31 [0.66, 6.13] |
Continued on next page
Supplementary Table 35.2 (continued)
| Comparison | n | Primary difference | With summary, difference [95% CI] |
|---|---|---|---|
| PathXAI-Report vs Qwen + H&E | 604 | 3.31 | 2.48 [-0.83, 5.79] |
| Private reference P1 | |||
| PathXAI-Report vs PathXAI-Report (core) | 135 | 9.63 | 2.22 [-4.44, 8.89] |
| PathXAI-Report vs Qwen + H&E | 135 | 13.33 | 11.85 [4.44, 19.26] |
| Private reference P2 | |||
| PathXAI-Report vs PathXAI-Report (core) | 136 | 11.76 | 4.41 [-1.47, 10.29] |
| PathXAI-Report vs Qwen + H&E | 136 | 13.24 | 11.76 [4.41, 19.12] |
| Reporting policies | |||
| H&E + tissue statistics vs Qwen + H&E | 352 | 4.55 | 3.98 [0.00, 7.95] |
| H&E + segmentation overlays vs Qwen + H&E | 352 | 0.57 | 1.70 [-2.84, 6.25] |
| PathXAI-Report vs H&E + tissue statistics | 352 | 0.00 | 0.85 [-3.69, 5.40] |
| PathXAI-Report vs H&E + segmentation overlays | 352 | 3.98 | 3.12 [-1.14, 7.10] |
Supplementary Table 36.1 Cancer family match rate after including recognized final-summary diagnoses. The alternative extraction scope is defined in Supplementary Table 35.1. TCGA disease-family targets, case sets and compatibility rules are unchanged, including the breast in-situ and lower-grade glioma rules. Changes are alternative minus primary in pp, with unadjusted 95% paired case-bootstrap intervals (4,000 shared draws). The reporting-policy cohort overlaps the public development subset. Complete source-specific estimates and contrasts are supplied in the accompanying aggregate data. This analysis measures extraction sensitivity, not clinical correctness.
| Method | n | Primary (%) | With summary (%) | Change, pp [95% CI] |
|---|---|---|---|---|
| Public pooled cohort | ||||
| Qwen + H&E | 1656 | 69.02 | 68.78 | -0.24 [-0.79, 0.30] |
| DeepSeek + H&E | 1656 | 71.56 | 71.14 | -0.42 [-0.91, 0.00] |
| GLM + H&E | 1656 | 60.21 | 57.37 | -2.84 [-4.23, -1.45] |
| MedGemma | 1656 | 6.94 | 12.20 | 5.25 [4.17, 6.34] |
| PLIP-guided Qwen | 1656 | 41.30 | 41.30 | 0.00 [0.00, 0.00] |
| PRISM2 | 1656 | 53.99 | 53.99 | 0.00 [0.00, 0.00] |
| PathXAI-Report (core) | 1656 | 69.69 | 69.81 | 0.12 [-0.36, 0.61] |
| PathXAI-Report | 1656 | 73.67 | 71.56 | -2.11 [-2.84, -1.39] |
| Reporting policies | ||||
| Qwen + H&E | 456 | 71.49 | 70.83 | -0.66 [-1.97, 0.66] |
| H&E + tissue statistics | 456 | 75.66 | 74.12 | -1.54 [-3.29, 0.22] |
| H&E + segmentation overlays | 456 | 71.05 | 69.96 | -1.10 [-2.41, 0.00] |
| PathXAI-Report | 456 | 76.75 | 74.12 | -2.63 [-4.17, -1.32] |
Supplementary Table 36.2 Cancer family match rate extraction sensitivity. Selected paired differences are target minus comparator in pp. The development subset and evaluation cohort partition the combined public cohort.
| Comparison | n | Primary difference | With summary, difference [95% CI] |
|---|---|---|---|
| Public pooled cohort | |||
| PathXAI-Report vs DeepSeek + H&E | 1656 | 2.11 | 0.42 [-1.75, 2.66] |
| PathXAI-Report vs PathXAI-Report (core) | 1656 | 3.99 | 1.75 [-0.12, 3.62] |
| PathXAI-Report vs Qwen + H&E | 1656 | 4.65 | 2.78 [0.66, 4.89] |
| Public development subset | |||
| PathXAI-Report vs Qwen + H&E | 456 | 5.26 | 3.29 [-0.66, 7.46] |
| Public evaluation cohort | |||
| PathXAI-Report vs Qwen + H&E | 1200 | 4.42 | 2.58 [0.08, 5.09] |
| Reporting policies | |||
| H&E + tissue statistics vs Qwen + H&E | 456 | 4.17 | 3.29 [0.00, 6.58] |
| H&E + segmentation overlays vs Qwen + H&E | 456 | -0.44 | -0.88 [-4.61, 2.85] |
| PathXAI-Report vs H&E + tissue statistics | 456 | 1.10 | 0.00 [-3.95, 3.95] |
| PathXAI-Report vs H&E + segmentation overlays | 456 | 5.70 | 4.17 [0.44, 7.68] |
- Multiple-comparison sensitivity
After Holm adjustment across 126 comparisons, tests of PathXAI-Report versus Qwen + H&E in the public evaluation cohort gave for cancer family match rate, finding F1, finding recall and finding contradiction rate (Supplementary Table 37). The exact diagnosis match rate differences from Qwen + H&E, DeepSeek + H&E and PathXAI-Report (core) did not meet this threshold. None of the five comparisons with Qwen + H&E in either private reference set met the adjusted threshold. For the dedicated report generators, the public cancer family match rate, finding F1 and finding recall comparisons gave adjusted for both comparators; the exact diagnosis match rate comparison did so for HistoGPT but not HistGen. PathXAI-Report also had a higher finding contradiction rate than PLIP-guided Qwen in the public evaluation cohort (adjusted ). The table includes all comparisons; the adjustment leaves their point estimates unchanged.
Supplementary Table 37 Multiple-comparison sensitivity for automated report evaluation. Each cell gives the paired mean difference in percentage points (PathXAI-Report minus comparator), with the Holm-adjusted value below in parentheses. Negative differences favour PathXAI-Report only for finding contradiction rate; positive differences favour it for the other measures. One family contains all 126 two-sided tests across the four groups. Binary measures use exact McNemar tests and finding measures use paired tests. PRISM2 supplies diagnostic outputs only. Group sizes describe eligible cohorts; metric-specific paired counts and unadjusted values are in Source Data. The original pointwise bootstrap intervals remain unadjusted.
| Comparator | Cancer family match rate | Exact diagnosis match rate | Finding F1 | Finding recall | Finding contradiction rate |
|---|---|---|---|---|---|
| Public evaluation cohort (1,200 cases) | |||||
| Qwen + H&E | +4.42(0.024) | +3.31(1.000) | +5.75(< 0.001) | +5.07(< 0.001) | -5.52(< 0.001) |
| +0.58(1.000) | +1.99(1.000) | +6.67(< 0.001) | +5.49(< 0.001) | -9.19(< 0.001) | |
| DeepSeek + H&E | +10.67(< 0.001) | +6.29(0.200) | +4.60(0.030) | +3.50(0.232) | -10.01(< 0.001) |
| GLM + H&E | +65.83(< 0.001) | +56.13(< 0.001) | +11.33(< 0.001) | +9.86(< 0.001) | -1.08(1.000) |
| MedGemma | +26.83(< 0.001) | +23.01(< 0.001) | +26.88(< 0.001) | +23.87(< 0.001) | +4.75(0.035) |
| PLIP-guided Qwen | +19.25(< 0.001) | +9.60(0.022) | — | — | — |
| PRISM2 | +4.33(0.007) | +4.14(0.171) | +2.07(0.880) | +2.24(0.473) | +1.38(1.000) |
| Dedicated report generators (215 shared public evaluation cases) | |||||
| HistGen | +38.60(< 0.001) | +20.55(0.806) | +26.06(< 0.001) | +22.40(< 0.001) | -18.05(0.184) |
| HistoGPT | +72.56(< 0.001) | +61.64(< 0.001) | +31.28(< 0.001) | +27.18(< 0.001) | +3.08(1.000) |
| Private cohort (151 shared cases), reference set P1 | |||||
| Qwen + H&E | +4.13(1.000) | +13.33(0.097) | +5.00(1.000) | +7.00(1.000) | +4.44(1.000) |
| DeepSeek + H&E | +2.48(1.000) | +7.41(1.000) | +10.11(0.044) | +13.33(0.002) | -2.16(1.000) |
| GLM + H&E | +28.93(< 0.001) | +24.44(0.001) | +13.44(0.004) | +18.33(< 0.001) | +4.76(1.000) |
| MedGemma | +89.26(< 0.001) | +64.44(< 0.001) | +38.11(< 0.001) | +39.33(< 0.001) | -18.92(< 0.001) |
| PLIP-guided Qwen | +4.96(1.000) | +34.81(< 0.001) | +45.44(< 0.001) | +51.67(< 0.001) | -5.56(1.000) |
| PRISM2 | +28.93(< 0.001) | +12.59(0.880) | — | — | — |
| HistGen | +85.12(< 0.001) | +62.22(< 0.001) | +55.33(< 0.001) | +59.00(< 0.001) | -6.56(1.000) |
| HistoGPT | +93.39(< 0.001) | +67.41(< 0.001) | +67.33(< 0.001) | +67.67(< 0.001) | -28.75(0.111) |
| PathXAI-Report (core) | +0.00(1.000) | +9.63(0.671) | +9.22(0.009) | +11.00(< 0.001) | -4.86(1.000) |
Supplementary Table 37 (continued)
| Comparator | Cancer family match rate | Exact diagnosis match rate | Finding F1 | Finding recall | Finding contradiction rate |
|---|---|---|---|---|---|
| Private cohort (151 shared cases), reference set P2 | |||||
| Qwen + H&E | +4.07(1.000) | +13.24(0.097) | +5.61(1.000) | +7.28(0.883) | +5.76(0.883) |
| DeepSeek + H&E | +3.25(1.000) | +11.76(0.419) | +9.80(0.044) | +12.58(0.003) | -2.38(1.000) |
| GLM + H&E | +28.46(< 0.001) | +24.26(0.002) | +14.19(0.004) | +18.43(< 0.001) | +4.80(1.000) |
| MedGemma | +89.43(< 0.001) | +64.71(< 0.001) | +36.07(< 0.001) | +36.87(< 0.001) | -16.97(0.002) |
| PLIP-guided Qwen | +4.88(1.000) | +36.03(< 0.001) | +45.78(< 0.001) | +51.10(< 0.001) | -5.68(1.000) |
| PRISM2 | +30.08(< 0.001) | +15.44(0.184) | — | — | — |
| HistGen | +85.37(< 0.001) | +62.50(< 0.001) | +57.37(< 0.001) | +60.38(< 0.001) | -9.52(1.000) |
| HistoGPT | +93.50(< 0.001) | +67.65(< 0.001) | +69.40(< 0.001) | +69.65(< 0.001) | -35.00(0.005) |
| PathXAI-Report (core) | +0.00(1.000) | +11.76(0.110) | +7.95(0.087) | +9.71(0.014) | -2.10(1.000) |
7. Report availability and sensitivity to unavailable outputs
All eight methods in the main public evaluation had saved outputs for all 1,200 cases. Among the 217 public cases eligible for the dedicated-generator comparison, HistGen and HistoGPT each had 216 reports, with 215 cases shared by all four methods. In the private cohort, GLM + H&E had reports for 151 of 152 cases; the other nine methods had all 152 (Supplementary Table 38).
Including all eligible cases and assigning zero to unavailable outputs changed each paired difference by less than 1 pp. Across the four measures, no nonzero difference between PathXAI-Report and a comparator changed direction (Supplementary Table 39).
Supplementary Table 38 Saved report availability in the evaluation cohorts. Cells give available outputs / eligible cases. Public eligibility for dedicated report generators additionally excludes potential HistGen training/validation overlap. Private counts are identical for P1 and P2; all ten methods share 151 cases. Dashes indicate comparisons outside the listed analysis. These counts describe saved outputs; original attempt, retry and failure counts are unavailable.
| Method | Public evaluation | Dedicated-generator public comparison | Private cohort |
|---|---|---|---|
| Qwen + H&E | 1200 / 1200 | — | 152 / 152 |
| DeepSeek + H&E | 1200 / 1200 | — | 152 / 152 |
| GLM + H&E | 1200 / 1200 | — | 151 / 152 |
| MedGemma | 1200 / 1200 | — | 152 / 152 |
| PLIP-guided Qwen | 1200 / 1200 | — | 152 / 152 |
| PRISM2 | 1200 / 1200 | — | 152 / 152 |
| HistGen | — | 216 / 217 | 152 / 152 |
| HistoGPT | — | 216 / 217 | 152 / 152 |
| PathXAI-Report (core) | 1200 / 1200 | 217 / 217 | 152 / 152 |
| PathXAI-Report | 1200 / 1200 | 217 / 217 | 152 / 152 |
Supplementary Table 39 Sensitivity to unavailable reports. Each cell gives the PathXAI-Report-minus-comparator difference in percentage points on shared cases, followed by the difference on all eligible cases with unavailable reports scored zero (shared / unavailable-as-zero). Metric-specific applicability still follows the reference. Positive differences favour PathXAI-Report. Finding contradiction rate is omitted because a missing output has no definite assertions. Source Data provide method estimates, paired counts and pointwise intervals for shared, available-output and unavailable-as-zero analyses. PRISM2 supplies diagnostic outputs only.
| Comparator | Cancer family match rate | Exact diagnosis match rate | Finding F1 | Finding recall |
|---|---|---|---|---|
| Public dedicated-generator comparison: 215 shared / 217 eligible cases | ||||
| HistGen | +38.60 / +38.25 | +20.55 / +20.55 | +26.06 / +26.14 | +22.40 / +22.52 |
| HistoGPT | +72.56 / +71.89 | +61.64 / +61.64 | +31.28 / +31.31 | +27.18 / +27.25 |
| PathXAI-Report (core) | +4.19 / +3.23 | +4.11 / +4.11 | +0.07 / +0.17 | +0.19 / +0.29 |
| Private reference set P1: 151 shared / 152 eligible cases | ||||
| Qwen + H&E | +4.13 / +4.13 | +13.33 / +13.24 | +5.00 / +4.64 | +7.00 / +6.62 |
| DeepSeek + H&E | +2.48 / +2.48 | +7.41 / +7.35 | +10.11 / +10.04 | +13.33 / +13.25 |
| GLM + H&E | +28.93 / +28.93 | +24.44 / +24.26 | +13.44 / +13.36 | +18.33 / +18.21 |
| MedGemma | +89.26 / +89.26 | +64.44 / +63.97 | +38.11 / +37.86 | +39.33 / +39.07 |
| PLIP-guided Qwen | +4.96 / +4.96 | +34.81 / +34.56 | +45.44 / +45.14 | +51.67 / +51.32 |
| PRISM2 | +28.93 / +28.93 | +12.59 / +11.76 | — | — |
| HistGen | +85.12 / +85.12 | +62.22 / +61.76 | +55.33 / +54.97 | +59.00 / +58.61 |
| HistoGPT | +93.39 / +93.39 | +67.41 / +66.91 | +67.33 / +66.89 | +67.67 / +67.22 |
| PathXAI-Report (core) | +0.00 / +0.00 | +9.63 / +9.56 | +9.22 / +9.16 | +11.00 / +10.93 |
| Private reference set P2: 151 shared / 152 eligible cases | ||||
| Qwen + H&E | +4.07 / +4.07 | +13.24 / +13.14 | +5.61 / +5.24 | +7.28 / +6.91 |
| DeepSeek + H&E | +3.25 / +3.25 | +11.76 / +11.68 | +9.80 / +9.74 | +12.58 / +12.50 |
| GLM + H&E | +28.46 / +28.46 | +24.26 / +24.09 | +14.19 / +14.10 | +18.43 / +18.31 |
| MedGemma | +89.43 / +89.43 | +64.71 / +64.23 | +36.07 / +35.83 | +36.87 / +36.62 |
| PLIP-guided Qwen | +4.88 / +4.88 | +36.03 / +35.77 | +45.78 / +45.48 | +51.10 / +50.77 |
| PRISM2 | +30.08 / +30.08 | +15.44 / +14.60 | — | — |
| HistGen | +85.37 / +85.37 | +62.50 / +62.04 | +57.37 / +57.00 | +60.38 / +59.98 |
| HistoGPT | +93.50 / +93.50 | +67.65 / +67.15 | +69.40 / +68.95 | +69.65 / +69.19 |
| PathXAI-Report (core) | +0.00 / +0.00 | +11.76 / +11.68 | +7.95 / +7.89 | +9.71 / +9.65 |
8. Cancer-type- and organ-stratified comparisons
Stratified resampling retained the original paired estimates and conditioned their intervals on the observed cancer-type or organ composition (Supplementary Table 40). In the public evaluation cohort, all five pointwise intervals for differences from Qwen + H&E excluded zero in favour of PathXAI-Report.
In the private cohort, exact diagnosis match rate and finding recall differences from Qwen + H&E had intervals above zero for both reference sets, while cancer family match rate and finding F1 intervals included zero. The higher finding contradiction rate had an interval above zero for P2 and included zero for P1. These are pointwise intervals; the separate multiplicity analysis is reported in Supplementary Results section 6. Source Data gives descriptive results within each of the 22 public cancer types and three private organs, with metric-specific counts. Three public cancer types had only one case each.
Supplementary Table 40 Cancer-type- and organ-stratified report comparisons. Cells give the paired mean difference (PathXAI-Report minus comparator) in percentage points with the applicable paired count in parentheses, followed by the pointwise 95% interval. The 4,000 bootstrap draws retain each public TCGA cancer type's or private organ group's paired count. Intervals condition on this observed composition; singleton and constant groups contribute no empirical resampling variance. Positive differences favour PathXAI-Report except for finding contradiction rate, where negative differences favour it. PRISM2 provides diagnostic outputs only. Subgroup counts and descriptive estimates are in Source Data; resampling details are in Supplementary Methods section 3.10.
| Comparator | Cancer family match rate | Exact diagnosis match rate | Finding F1 | Finding recall | Finding contradiction rate |
|---|---|---|---|---|---|
| Public evaluation cohort (1,200 cases) | |||||
| +4.42 (1200) | +3.31 (604) | +5.75 (997) | +5.07 (997) | -5.52 (664) | |
| Qwen + H&E | [2.08, 6.83] | [0.33, 6.29] | [3.66, 7.87] | [3.10, 7.07] | [-8.01, -3.15] |
| +0.58 (1200) | +1.99 (604) | +6.67 (997) | +5.49 (997) | -9.19 (634) | |
| DeepSeek + H&E | [-1.92, 3.00] | [-1.66, 5.79] | [4.17, 9.15] | [3.19, 7.81] | [-12.10, -6.31] |
| +10.67 (1200) | +6.29 (604) | +4.60 (997) | +3.50 (997) | -10.01 (644) | |
| GLM + H&E | [7.83, 13.50] | [2.15, 10.10] | [2.07, 7.17] | [0.91, 5.95] | [-13.02, -6.99] |
| +65.83 (1200) | +56.13 (604) | +11.33 (997) | +9.86 (997) | -1.08 (546) | |
| MedGemma | [63.50, 68.08] | [52.65, 59.27] | [8.89, 13.78] | [7.58, 12.17] | [-3.77, 1.57] |
| +26.83 (1200) | +23.01 (604) | +26.88 (997) | +23.87 (997) | +4.75 (327) | |
| PLIP-guided Qwen | [24.67, 29.00] | [20.03, 26.16] | [24.68, 29.16] | [21.72, 26.01] | [2.09, 7.41] |
| +19.25 (1200) | +9.60 (604) | ||||
| PRISM2 | [16.00, 22.58] | [4.97, 14.07] | — | — | — |
| +4.33 (1200) | +4.14 (604) | +2.07 (997) | +2.24 (997) | +1.38 (686) | |
| PathXAI-Report (core) | [2.25, 6.42] | [1.49, 6.79] | [0.29, 3.94] | [0.50, 3.93] | [-0.31, 3.07] |
| Dedicated report generators (215 shared public evaluation cases) | |||||
| +38.60 (215) | +20.55 (73) | +26.06 (173) | +22.40 (173) | -18.05 (64) | |
| HistGen | [32.09, 45.12] | [12.33, 28.77] | [20.48, 31.53] | [17.22, 27.66] | [-27.73, -8.41] |
| +72.56 (215) | +61.64 (73) | +31.28 (173) | +27.18 (173) | +3.08 (39) | |
| HistoGPT | [67.91, 77.67] | [54.79, 68.49] | [25.88, 36.72] | [22.51, 31.97] | [-4.62, 10.26] |
| Private cohort (151 shared cases), reference set P1 | |||||
| +4.13 (121) | +13.33 (135) | +5.00 (150) | +7.00 (150) | +4.44 (135) | |
| Qwen + H&E | [-1.65, 9.92] | [5.93, 20.74] | [-1.11, 11.11] | [0.67, 13.33] | [-0.75, 10.00] |
| +2.48 (121) | +7.41 (135) | +10.11 (150) | +13.33 (150) | -2.16 (139) | |
| DeepSeek + H&E | [-4.13, 9.09] | [-0.74, 15.56] | [4.33, 16.00] | [7.33, 19.33] | [-7.55, 3.24] |
| +28.93 (121) | +24.44 (135) | +13.44 (150) | +18.33 (150) | +4.76 (126) | |
| GLM + H&E | [20.64, 38.02] | [14.81, 34.07] | [7.33, 19.44] | [12.00, 24.67] | [-0.79, 9.92] |
| +89.26 (121) | +64.44 (135) | +38.11 (150) | +39.33 (150) | -18.92 (111) | |
| MedGemma | [83.47, 94.21] | [56.30, 71.85] | [31.11, 44.78] | [33.00, 46.00] | [-26.58, -11.26] |
| +4.96 (121) | +34.81 (135) | +45.44 (150) | +51.67 (150) | -5.56 (90) | |
| PLIP-guided Qwen | [-1.65, 11.57] | [27.39, 42.22] | [40.56, 50.33] | [47.00, 56.33] | [-10.56, 0.00] |
| +28.93 (121) | +12.59 (135) | ||||
| PRISM2 | [19.83, 37.19] | [2.96, 21.48] | — | — | — |
| +85.12 (121) | +62.22 (135) | +55.33 (150) | +59.00 (150) | -6.56 (61) | |
| HistGen | [77.69, 91.74] | [54.07, 69.63] | [49.33, 61.22] | [53.33, 64.00] | [-16.39, 2.46] |
| +93.39 (121) | +67.41 (135) | +67.33 (150) | +67.67 (150) | -28.75 (40) | |
| HistoGPT | [89.26, 97.52] | [60.00, 74.81] | [61.22, 73.33] | [61.67, 73.33] | [-45.00, -11.25] |
| +0.00 (121) | +9.63 (135) | +9.22 (150) | +11.00 (150) | -4.86 (144) | |
| PathXAI-Report (core) | [-5.79, 5.79] | [2.22, 17.04] | [4.66, 14.00] | [6.33, 15.67] | [-9.72, 0.00] |
| Private cohort (151 shared cases), reference set P2 | |||||
| +4.07 (123) | +13.24 (136) | +5.61 (151) | +7.28 (151) | +5.76 (133) | |
| Qwen + H&E | [-1.63, 9.76] | [5.88, 20.59] | [-0.18, 11.85] | [0.77, 13.47] | [0.75, 10.65] |
| +3.25 (123) | +11.76 (136) | +9.80 (151) | +12.58 (151) | -2.38 (140) | |
| DeepSeek + H&E | [-3.25, 9.76] | [3.68, 19.85] | [4.28, 15.39] | [6.73, 18.43] | [-7.86, 3.33] |
| +28.46 (123) | +24.26 (136) | +14.19 (151) | +18.43 (151) | +4.80 (125) | |
| GLM + H&E | [20.30, 37.40] | [14.71, 33.82] | [7.64, 20.57] | [11.92, 24.94] | [-0.80, 10.40] |
| +89.43 (123) | +64.71 (136) | +36.07 (151) | +36.87 (151) | -16.97 (109) | |
| MedGemma | [83.74, 94.31] | [57.35, 72.06] | [29.07, 42.96] | [30.13, 43.49] | [-24.32, -9.63] |
| +4.88 (123) | +36.03 (136) | +45.78 (151) | +51.10 (151) | -5.68 (88) | |
| PLIP-guided Qwen | [-1.63, 11.38] | [28.68, 42.65] | [40.88, 50.51] | [46.36, 55.74] | [-10.80, 0.00] |
| +30.08 (123) | +15.44 (136) | ||||
| PRISM2 | [21.95, 38.21] | [6.62, 23.55] | — | — | — |
| +85.37 (123) | +62.50 (136) | +57.37 (151) | +60.38 (151) | -9.52 (63) | |
| HistGen | [78.86, 91.87] | [54.41, 69.85] | [51.21, 63.47] | [55.08, 66.00] | [-19.05, 0.00] |
| +93.50 (123) | +67.65 (136) | +69.40 (151) | +69.65 (151) | -35.00 (40) | |
| HistoGPT | [88.62, 97.56] | [60.29, 75.00] | [63.58, 75.01] | [64.35, 74.61] | [-51.25, -18.75] |
| +0.00 (123) | +11.76 (136) | +7.95 (151) | +9.71 (151) | -2.10 (143) | |
| PathXAI-Report (core) | [-5.69, 5.69] | [5.15, 18.38] | [3.16, 12.83] | [4.53, 14.79] | [-6.41, 2.21] |
9. Evidence-linked public cases and failure analysis
Two public cases illustrate agreement and disagreement with TCGA cohort targets.
(a) Evidence acquisition and reporting timeline
TCGA-OR-A5LL · TCGA-ACC

Additional G1/G2 for grade · then final report
Additional grade ROIs
H&E only

Final structured report · excerpt
TCGA target: adrenocortical carcinoma
Diagnosis: Adrenocortical carcinoma
Microscopic description: The cells display enlarged, irregular nuclei with prominent nucleoli. The tumor architecture is disorganized, with cells arranged in solid nests and trabeculae.
Necrosis: Extensive geographic necrosis is present, characterized by large areas of eosinophilic cellular debris and loss of nuclear detail.
Invasion: Assessment of capsular invasion, vascular invasion, and invasion into adjacent normal adrenal tissue is not assessable from H&E ROI evidence.
Grade: High (Malignant).
Prognostic features: The presence of extensive necrosis and high-grade cytologic features are associated with aggressive behavior.
Neoplastic
Inflammatory
Connective
Epithelial
Dead / necrotic
Gland
Supplementary Figure 23 A public report with a target-concordant diagnosis. (a) Evidence acquisition and reporting. CONCH ranking precedes VLM region selection. Reinspection uses central-crop 2× digital zooms of the original diagnostic ROIs. G1/G2 are unmasked writer-only grade images; high grade was already assigned before writing. Abridged report excerpts match the TCGA cancer-family target. Report excerpts and verification records correspond to the released Full example used in Fig. 4. Retrieved FNA text in Fig. 4 supplies external disease context. Tissue checks assess tumour presence and stromal evidence; architectural and cytological descriptions require image interpretation. (Notation: WSI, whole-slide image; ROI, region of interest; VLM, vision-language model; H&E, haematoxylin and eosin; FNA, fine-needle aspiration. Display conventions and scale bars follow Supplementary Fig. 24.)
(a) Evidence acquisition and reporting timeline
TCGA-KV-A6GD · TCGA-KIRP
9 available WSIs · context

Additional grade ROIs
H&E only

Final structured report · excerpt
TCGA target: papillary renal cell carcinoma
Diagnosis: Renal neoplasm, not otherwise specified
Microscopic description: The submitted tissue sections are characterized by extensive geographic necrosis occupying the majority of the field. Viable tumor tissue is sparse, with only minute foci of neoplastic and epithelial elements identified amidst the necrotic background.
Necrosis: Extensive geographic necrosis occupying the majority of the field.
Invasion: Not assessable from H&E ROI evidence.
Grade: Not assessable.
Prognostic features: The presence of extensive necrosis is noted.
Supplementary Figure 24
A public report with persistent target discordance. (a) Evidence acquisition and reporting. CONCH ranking precedes VLM region selection. Reinspection uses central-crop 2× digital zooms; G1/G2 supply unmasked H&E for writing only. The final diagnosis remains broader than the papillary renal-cell-carcinoma TCGA target. (Notation: WSI, whole-slide image; ROI, region of interest; VLM, vision-language model; H&E, haematoxylin and eosin. Grey solid links denote repeated images; dashed guides link slides to ROIs. Crop boxes and magnifiers mark zooms; numbered boxes identify slides or ROIs. Predicted overlays use the shared tissue palette. Scale bars, 100 µm, calibrated from source WSIs.)
10. Segmentation transfer and training-objective comparisons
10.1. Validation across datasets and organs
Supplementary Tables 41.1 to 41.4 give the estimates and confidence intervals underlying Figs. 5(b) to 5(e). Per-dataset Dice and IoU, sample counts and source-cluster counts are in Source Data. Relative to same-backbone fine-tuning, PathXAI-Seg (SAM2) has higher internal lung Dice and lower internal colorectal Dice.
Class-specific results show different changes across tissues (Supplementary Table 42). On RINGS gland, PathXAI-Seg (MedSAM3) improved both gland and background mean Dice relative to same-backbone fine-tuning. The SAM2 variant increased background Dice from 52.27% to 69.60% but reduced gland Dice from 56.72% to 37.05%. Class support also varied: epithelial Dice was evaluated on only two WSSS4LUAD images.
Coupling the bootstrap draws for the shared RINGS sources retained the MedSAM3-versus-fine-tuning external gain of 0.83 pp; its 95% interval was 0.41–1.35, compared with 0.44–1.32 under task-stratified resampling (Source Data). The sampling procedures are described in Supplementary Methods section 1.4.
MedSAM3 fine-tuning and PathXAI-Seg (MedSAM3) had similar mean Dice on the complete PAIP2019 test set (Fig. 5(b)).
In the shared external comparison, both PathXAI-Seg variants had higher equal-dataset foreground Dice than Path-Segmentor and VISTA-PATH, while VISTA-PATH had the highest background Dice on each dataset (Supplementary Table 43). Under the reference-class-presence condition, all four methods scored nearly 100% Dice on the 7,584 images containing only one class. On the 2,432 images containing both foreground and background, equal-dataset mean Dice was 55.70% for PathXAI-Seg (SAM2), 54.21% for PathXAI-Seg (MedSAM3), 51.01% for VISTA-PATH and 31.59% for PathSegmentor. These mixed-class estimates describe segmentation where a spatial boundary is present.
Supplementary Table 41.1 Numerical results underlying Fig. 5, showing mean Dice in Fig. 5(b). Cells give Dice (%) with pointwise 95% intervals. Macro n counts test sets, not images; six external tasks come from five source datasets. Per-dataset Dice/IoU, image-row and source-cluster counts are retained in the companion CSV. Implementation details are given in Supplementary Methods section 1.4.
| Method | Internal5 test sets | External6 tasks | Combined11 test sets |
|---|---|---|---|
| HoVer-Net FT, aligned | 62.02[58.29, 65.87] | 33.95[32.60, 35.27] | 46.71[44.85, 48.59] |
| nnU-Net 2D, aligned | 64.43[60.19, 68.64] | 39.21[37.80, 40.51] | 50.67[48.61, 52.70] |
| CONCHSeg, aligned | 14.22[12.72, 15.70] | 26.44[24.81, 27.77] | 20.88[19.76, 21.86] |
| MedSAM3 Zero-shot | 31.45[29.50, 33.39] | 56.34[54.08, 59.05] | 45.02[43.51, 46.74] |
| SAM2 FT | 63.38[58.52, 68.42] | 71.63[70.15, 73.24] | 67.88[65.52, 70.34] |
| MedSAM3 FT | 65.67[60.65, 70.84] | 72.28[70.42, 74.28] | 69.28[66.78, 71.88] |
| PathXAI-Seg (SAM2) | 65.04[60.11, 70.14] | 71.78[70.23, 73.53] | 68.71[66.28, 71.27] |
| PathXAI-Seg (MedSAM3) | 68.26[64.47, 72.09] | 73.10[71.32, 75.06] | 70.90[68.95, 72.98] |
Supplementary Table 41.2 Numerical results underlying Fig. 5(c) for the shared external comparison. Dice ↑ (%) with 95% intervals. The shared-set macro equally weights these three datasets and is distinct from the six-task external macro across five source datasets.
| Dataset | PathSegmentor | VISTA-PATH | PathXAI-Seg(SAM2) | PathXAI-Seg(MedSAM3) |
|---|---|---|---|---|
| ACDC-LungHP | 82.44[78.20, 85.48] | 84.45[80.83, 87.10] | 85.06[81.58, 87.64] | 84.73[81.15, 87.39] |
| PAIP2019 | 70.14[67.34, 73.09] | 71.61[68.43, 74.76] | 76.07[73.74, 78.51] | 75.67[72.99, 78.38] |
| METU-CCTGS | 21.79[15.29, 28.55] | 69.41[62.33, 76.17] | 72.21[66.42, 77.89] | 69.79[62.86, 76.54] |
| Shared-set macro | 58.12[55.34, 60.80] | 75.16[72.35, 77.82] | 77.78[75.43, 80.03] | 76.73[74.01, 79.34] |
Supplementary Table 41.3 Numerical results underlying Fig. 5(e), showing paired gain over same-backbone standard fine-tuning, in pp with 95% intervals. Equal-task and equal-organ weighting are separate estimands.
| Test / weighting | SAM2 gain ↑ | MedSAM3 gain ↑ |
|---|---|---|
| internal; tasks | 1.66[0.14, 3.04] | 2.59[0.16, 5.20] |
| internal; organs | 3.04[0.99, 4.71] | 3.56[-0.11, 7.63] |
Continued on next page
Supplementary Table 41.3 (continued)
| Test / weighting | SAM2 gain ↑ | MedSAM3 gain ↑ |
|---|---|---|
| external; tasks | 0.15[-0.28, 0.66] | 0.83[0.44, 1.32] |
| external; organs | 0.33[0.01, 0.70] | 0.79[0.36, 1.37] |
Supplementary Table 41.4 Numerical results underlying Fig. 5(d), showing absolute organ Dice ↑ (%) with 95% intervals. METU-CCTGS is grouped with colorectal, and AGGC and RINGS with prostate. Dataset, row and source-cluster counts are in the CSV.
| Test / organ | SAM2 FT | PathXAI-Seg(SAM2) | MedSAM3 FT | PathXAI-Seg(MedSAM3) |
|---|---|---|---|---|
| Internal / Breast | 60.77[51.23, 70.42] | 64.42[54.02, 74.88] | 70.43[63.38, 77.58] | 72.14[66.60, 77.72] |
| Internal / Colorectal | 77.41[74.30, 80.28] | 72.93[69.91, 75.85] | 71.28[67.67, 74.86] | 71.84[67.89, 75.72] |
| Internal / Lung | 40.56[30.26, 52.55] | 50.49[42.21, 59.47] | 44.92[26.57, 63.68] | 53.36[40.61, 66.28] |
| External / Colorectal | 71.91[66.51, 77.33] | 72.21[66.59, 77.91] | 67.53[59.96, 75.11] | 69.79[63.20, 76.61] |
| External / Liver | 75.16[72.74, 77.69] | 76.07[73.68, 78.55] | 75.89[73.36, 78.48] | 75.67[72.97, 78.39] |
| External / Lung | 84.72[81.05, 87.50] | 85.06[81.58, 87.67] | 84.50[80.85, 87.26] | 84.73[81.16, 87.41] |
| External / Prostate | 66.00[64.11, 68.26] | 65.77[63.71, 68.43] | 68.58[66.28, 71.41] | 69.48[67.15, 72.48] |
Supplementary Table 42.1 Class-specific performance in the main segmentation comparison. Cells give descriptive mean Dice (%) over samples scored for the specified reference class; is the common sample count for all eight methods. Samples are images or ROIs, except for AGGC specimen aggregates. Class counts within a dataset can overlap. BCSS background is unlabelled and excluded. METU-CCTGS retains the original nonzero-mask foreground, including normal mucosa. Source Data supplies IoU, source counts and the unchanged primary-score reconstruction. FT, fine-tuning.
| Class / group | HoVer-NetFT | nnU-Net | CONCHSeg | MedSAM3zero-shot | SAM2FT | MedSAM3FT | PathXAI-Seg | ||
|---|---|---|---|---|---|---|---|---|---|
| SAM2 | MedSAM3 | ||||||||
| BCSS (internal) | |||||||||
| Neoplastic | 31 | 56.79 | 72.52 | 50.95 | 0.31 | 77.74 | 81.58 | 79.88 | 82.01 |
| Inflammatory | 26 | 43.89 | 53.99 | 0.00 | 0.00 | 55.07 | 67.10 | 62.86 | 66.78 |
| Connective | 31 | 50.21 | 60.09 | 0.00 | 11.86 | 63.50 | 65.15 | 64.92 | 63.63 |
| Dead / necrotic | 19 | 0.00 | 15.79 | 0.00 | 4.35 | 50.20 | 62.42 | 54.17 | 66.57 |
| Gland | 7 | 0.00 | 2.95 | 0.00 | 2.97 | 5.71 | 14.29 | 30.09 | 29.16 |
| DigestPath2019 (internal) | |||||||||
| Background | 50 | 83.90 | 88.36 | 0.00 | 81.42 | 92.84 | 91.01 | 93.97 | 91.00 |
| Neoplastic | 50 | 50.23 | 47.06 | 21.98 | 41.81 | 61.23 | 60.45 | 64.58 | 60.97 |
| GlaS (internal) | |||||||||
| Background | 33 | 80.22 | 91.84 | 0.00 | 55.61 | 76.18 | 68.76 | 73.11 | 69.87 |
| Gland | 33 | 82.77 | 92.05 | 0.00 | 18.75 | 79.38 | 64.91 | 60.07 | 65.51 |
| BACH WSI (internal) | |||||||||
| Background | 2 | 57.57 | 53.74 | 0.00 | 59.57 | 48.84 | 67.60 | 54.91 | 74.31 |
| Neoplastic | 2 | 64.91 | 23.44 | 72.89 | 0.01 | 74.86 | 81.16 | 73.58 | 78.79 |
| WSSS4LUAD (internal) | |||||||||
| Background | 8 | 71.60 | 86.89 | 0.00 | 53.54 | 21.82 | 26.09 | 48.53 | 44.91 |
| Neoplastic | 5 | 61.07 | 71.14 | 41.24 | 6.28 | 52.56 | 58.21 | 55.48 | 58.38 |
| Connective | 6 | 67.83 | 79.28 | 0.00 | 6.92 | 52.60 | 59.71 | 54.30 | 59.82 |
| Epithelial | 2 | 0.00 | 0.00 | 0.00 | 5.89 | 49.38 | 42.68 | 34.42 | 55.22 |
| ACDC-LungHP (external) | |||||||||
| Background | 751 | 35.08 | 43.55 | 0.00 | 59.83 | 34.55 | 34.68 | 43.53 | 38.88 |
| Neoplastic | 5,000 | 0.29 | 4.38 | 93.33 | 85.98 | 92.25 | 91.99 | 91.29 | 91.62 |
| PAIP2019 (external) | |||||||||
| Background | 4,946 | 55.19 | 40.88 | 0.00 | 73.22 | 69.71 | 71.21 | 70.88 | 71.66 |
| Neoplastic | 1,719 | 53.77 | 38.64 | 88.82 | 8.37 | 90.84 | 89.35 | 91.02 | 87.19 |
| RINGS tumour (external) | |||||||||
| Background | 496 | 21.24 | 45.15 | 0.00 | 83.09 | 85.46 | 89.02 | 86.77 | 89.46 |
| Neoplastic | 238 | 54.51 | 54.39 | 58.32 | 8.55 | 71.75 | 76.32 | 72.59 | 77.06 |
Continued on next page
Supplementary Table 42.1 (continued)
| Class / group | n | HoVer-Net FT | nnU-Net | CONCHSeg | MedSAM3 zero-shot | SAM2 FT | MedSAM3 FT | PathXAI-Seg | |
|---|---|---|---|---|---|---|---|---|---|
| SAM2 | MedSAM3 | ||||||||
| RINGS gland (external) | |||||||||
| Background | 500 | 7.73 | 34.87 | 0.00 | 56.66 | 52.27 | 72.30 | 69.60 | 73.83 |
| Gland | 465 | 8.39 | 6.87 | 0.00 | 16.57 | 56.72 | 36.81 | 37.05 | 39.23 |
| METU-CCTGS (external) | |||||||||
| Background | 16 | 79.45 | 92.16 | 0.00 | 91.13 | 88.65 | 82.64 | 88.35 | 85.22 |
| Neoplastic | 16 | 39.62 | 25.05 | 22.15 | 15.32 | 55.17 | 52.42 | 56.08 | 54.36 |
| AGGC tumour (external) | |||||||||
| Background | 73 | 88.30 | 83.78 | 1.92 | 87.32 | 85.35 | 78.34 | 85.87 | 79.51 |
| Neoplastic | 72 | 0.00 | 30.56 | 47.58 | 11.15 | 39.47 | 52.78 | 36.26 | 51.98 |
Supplementary Table 42.2 Performance by number of scored reference classes in the main segmentation comparison. Cells give descriptive mean Dice (%): reference-present class scores are first averaged within each sample, then across the n eligible samples. Samples are images or ROIs, except for AGGC specimen aggregates. One class includes foreground-only or background-only samples; multiple classes means at least two scored reference classes, including background when scored. All predictions, label mappings and original scores are retained; these strata do not measure false positives for absent reference classes.
| Class / group | n | HoVer-Net FT | nnU-Net | CONCHSeg | MedSAM3 zero-shot | SAM2 FT | MedSAM3 FT | PathXAI-Seg | |
|---|---|---|---|---|---|---|---|---|---|
| SAM2 | MedSAM3 | ||||||||
| BCSS (internal) | |||||||||
| Multiple classes | 31 | 40.27 | 52.46 | 14.67 | 4.47 | 60.74 | 67.42 | 65.57 | 68.51 |
| DigestPath2019 (internal) | |||||||||
| Multiple classes | 50 | 67.07 | 67.71 | 10.99 | 61.61 | 77.03 | 75.73 | 79.28 | 75.98 |
| GlaS (internal) | |||||||||
| Multiple classes | 33 | 81.50 | 91.95 | 0.00 | 37.18 | 77.78 | 66.83 | 66.59 | 67.69 |
| BACH WSI (internal) | |||||||||
| Multiple classes | 2 | 61.24 | 38.59 | 36.45 | 29.79 | 61.85 | 74.38 | 64.25 | 76.55 |
| WSSS4LUAD (internal) | |||||||||
| Multiple classes | 8 | 61.92 | 72.66 | 8.59 | 24.39 | 42.89 | 44.51 | 51.52 | 53.72 |
| ACDC-LungHP (external) | |||||||||
| One class | 4,249 | 0.28 | 4.22 | 99.59 | 100.00 | 100.00 | 100.00 | 100.00 | 100.00 |
| Multiple classes | 751 | 17.70 | 24.43 | 28.93 | 33.26 | 41.49 | 40.67 | 42.79 | 41.55 |
| PAIP2019 (external) | |||||||||
| One class | 3,335 | 65.44 | 44.04 | 1.62 | 100.00 | 100.00 | 100.00 | 100.00 | 100.00 |
| Multiple classes | 1,665 | 44.19 | 36.56 | 44.23 | 12.92 | 50.28 | 51.73 | 52.11 | 51.30 |
| RINGS tumour (external) | |||||||||
| One class | 266 | 29.41 | 53.39 | 1.50 | 100.00 | 100.00 | 100.00 | 100.00 | 100.00 |
| Multiple classes | 234 | 33.51 | 45.16 | 28.80 | 35.57 | 70.22 | 76.32 | 72.04 | 77.16 |
| RINGS gland (external) | |||||||||
| One class | 35 | 14.14 | 15.96 | 0.00 | 100.00 | 100.00 | 100.00 | 100.00 | 100.00 |
| Multiple classes | 465 | 7.82 | 21.58 | 0.00 | 34.99 | 52.70 | 53.51 | 52.18 | 55.54 |
| METU-CCTGS (external) | |||||||||
| Multiple classes | 16 | 59.54 | 58.60 | 11.07 | 53.23 | 71.91 | 67.53 | 72.21 | 69.79 |
| AGGC tumour (external) | |||||||||
| One class | 1 | 100.00 | 97.26 | 6.23 | 95.50 | 98.52 | 93.16 | 99.18 | 95.39 |
| Multiple classes | 72 | 44.07 | 57.08 | 24.72 | 49.18 | 62.32 | 65.46 | 60.97 | 65.64 |
Supplementary Table 43 Class-specific and mixed-class performance in the shared external comparison. Cells give descriptive mean Dice / IoU (%). Foreground is the tumour-region label for ACDC-LungHP and PAIP2019, and the broader nonzero-mask label for METU-CCTGS. Class-specific means include images containing that reference class; their image counts can overlap. Mixed-class means include only images containing both foreground and background and average both class scores. Equal-dataset means weight the three datasets equally; their n values sum the eligible images. All results retain the original class-presence-conditioned predictions and masks.
| Dataset | Class | n | PathSegmentor | VISTA-PATH | PathXAI-Seg (SAM2) | PathXAI-Seg (MedSAM3) |
|---|---|---|---|---|---|---|
| Class-specific means | ||||||
| ACDC-LungHP | Foreground | 5,000 | 91.29 / 90.02 | 90.17 / 88.88 | 91.29 / 89.79 | 91.62 / 90.31 |
| Background | 751 | 23.50 / 18.71 | 46.32 / 37.59 | 43.53 / 33.49 | 38.88 / 31.40 | |
| PAIP2019 | Foreground | 1,719 | 75.50 / 70.94 | 64.97 / 59.14 | 91.02 / 87.22 | 87.19 / 83.07 |
| Background | 4,946 | 68.27 / 67.75 | 73.92 / 72.13 | 70.88 / 70.19 | 71.66 / 70.81 | |
| METU-CCTGS | Foreground | 16 | 17.49 / 10.30 | 50.24 / 37.12 | 56.08 / 41.33 | 54.36 / 40.27 |
| Background | 16 | 26.09 / 20.17 | 88.59 / 80.20 | 88.35 / 79.68 | 85.22 / 75.21 | |
| Equal-dataset mean | Foreground | 6,735 | 61.42 / 57.09 | 68.46 / 61.71 | 79.46 / 72.78 | 77.72 / 71.22 |
| Background | 5,713 | 39.29 / 35.54 | 69.61 / 63.31 | 67.59 / 61.12 | 65.26 / 59.14 | |
| Images containing both classes | ||||||
| ACDC-LungHP | Both | 751 | 32.76 / 26.17 | 40.45 / 31.76 | 42.79 / 32.76 | 41.55 / 33.46 |
| PAIP2019 | Both | 1,665 | 40.23 / 37.10 | 43.18 / 37.51 | 52.11 / 49.12 | 51.30 / 47.91 |
| METU-CCTGS | Both | 16 | 21.79 / 15.23 | 69.41 / 58.66 | 72.21 / 60.50 | 69.79 / 57.74 |
| Equal-dataset mean | Both | 2,432 | 31.59 / 26.17 | 51.01 / 42.65 | 55.70 / 47.46 | 54.21 / 46.37 |
10.2. Training stages, objective configurations and refinement branches
Figure 5(f) shows the objective-weight comparisons; Supplementary Table 44 also reports training checkpoints and refinement branches. The alternative refinement branches were evaluated only internally, with Dice ranging from 61.03% to 65.83%; these runs are distinct from the final focal-refinement checkpoint. Comparison designs and checkpoint-selection conditions are described in Supplementary Methods section 1.3.
Supplementary Table 44 Segmentation training stages and objective comparisons (Fig. 5(f)). Training-checkpoint estimates, objective contrasts and refinement branches, with pointwise 95% source-cluster bootstrap intervals. Absolute estimates are Dice (%); differences are expressed in pp (target minus reference). n counts images/specimens, not training seeds. The alternative refinement branches are evaluated on internal data only.
| Scope / metric | Configuration / contrast | n | Estimate | 95% CI |
|---|---|---|---|---|
| Training checkpoints: Internal (5 test sets; n=124 images) | ||||
| Dice ↑ | Supervised adaptation | 124 | 65.67 | [60.65, 70.84] |
| Dice ↑ | Joint supervision | 124 | 69.29 | [65.61, 73.10] |
| Dice ↑ | Focal refinement | 124 | 68.26 | [64.47, 72.09] |
| Training checkpoints: External (6 tasks; n=11089 images/specimens) | ||||
| Dice ↑ | Supervised adaptation | 11089 | 72.28 | [70.42, 74.28] |
| Dice ↑ | Joint supervision | 11089 | 73.33 | [71.49, 75.29] |
| Dice ↑ | Focal refinement | 11089 | 73.10 | [71.32, 75.06] |
| Objective-weight comparisons: Internal (5 test sets; n=124 images) | ||||
| Dice ↑ | L3 Label-guided localization, auxiliary-map weights = 0 minus Joint supervision reference | 124 | -0.74 | [-2.66, 0.37] |
| Dice ↑ | L2 Mask geometry, scale/shape weights = 0 minus Joint supervision reference | 124 | 0.60 | [-0.47, 1.83] |
| Dice ↑ | L5 Feature separation, spatial-contrast weight = 0 minus Joint supervision reference | 124 | -0.94 | [-2.01, -0.29] |
| Objective-weight comparisons: External (6 tasks; n=11089 images/specimens) | ||||
| Dice ↑ | L3 Label-guided localization, auxiliary-map weights = 0 minus Joint supervision reference | 11089 | -0.03 | [-0.27, 0.25] |
| Dice ↑ | L2 Mask geometry, scale/shape weights = 0 minus Joint supervision reference | 11089 | -0.03 | [-0.29, 0.29] |
| Dice ↑ | L5 Feature separation, spatial-contrast weight = 0 minus Joint supervision reference | 11089 | -0.50 | [-0.65, -0.33] |
| Shared-initialization refinement branches: Internal (5 test sets; n=124 images) | ||||
| Dice ↑ | Focal weighting | 124 | 65.83 | [61.47, 70.29] |
| Dice ↑ | Background suppression | 124 | 64.65 | [59.22, 69.99] |
| Dice ↑ | Reduced auxiliary entropy | 124 | 61.03 | [55.17, 66.81] |
| Dice ↑ | Boundary regularization | 124 | 62.81 | [56.20, 69.64] |
| Dice ↑ | Gland-lumen regularization | 124 | 62.69 | [57.72, 67.73] |
Colour and symbol conventions
Data sources, methods and tissue classes use separate colour keys, defined by direct labels and local legends.
Data sources and method identities
Pale backgrounds use lighter tints. Method marks are independent of cohort colours.
| Colour | Meaning in the indicated context |
|---|---|
| Blue | Internal tests and training data. In Fig. 5(a), open bars show training counts and filled bars show internal-test counts. |
| Yellow | External segmentation test sets and public/private report cohorts. |
| Dark teal | PathXAI-Seg (MedSAM3) in result comparisons. |
| Green | PathXAI-Seg (SAM2) and labelled segmentation variants. |
| Pink | PathXAI-Report and its outputs. |
| Mauve | PathXAI-Report (core) and labelled reporting variants. |
| Grey | Comparators and direct-input controls. |
| Purple | Knowledge, semantic conditioning or labelled study controls. Pale-purple shading identifies Core operations in Fig. 6. |
| Teal | Spatial tissue evidence and its processing. |
| Brown | Pathologist references and report assessment. |
Tissue classes
Label maps, overlays and tissue-fraction bars share this class key.
| Neoplastic | Inflammatory |
|---|---|
| Connective | Epithelial |
| Dead / necrotic | Gland |
| Background | White in label maps; transparent in the overlaid display. |
Shapes, lines and performance directions
| Form | Meaning |
|---|---|
| ↑ / ↓ | Higher / lower is preferable. Paired differences subtract the comparator method's score from the target method's score. |
| Points and whiskers | Estimates and 95% confidence intervals; captions specify analysis and resampling units. |
| Filled / open markers | PathXAI-Seg / fine-tuning in matched-backbone comparisons; squares denote MedSAM3 and diamonds SAM2. Other shapes follow local legends. |
| ■/□ ◆/◇ | Features, conditioning or predictions / labelled reference or supervision in segmentation. |
| Solid / dashed arrows | Dashed returns denote further acquisition in reporting.Parent ROI and its digitally enlarged H&E-segmentation pair. |
| Crop guides and magnifier | Repeated views of the same ROI (circular terminals) / stage order in public-case diagrams. |
| Grey links / timeline arrows | Optimized / frozen segmentation parameters. Numerals specify stages; an unnumbered flame applies to all stages. A report diagnosis lock preserves the final diagnosis during writing. |
| Flame / padlock | |
| Numbered stage colours | ■ 1, ■ 2 and ■ 3 denote segmentation-training stages and the introduction or modification of objectives. |
Screenshots retain their original interface colours and keys for interface states and review outcomes, distinct from the manuscript's cohort, method and tissue-class encodings.