Manuscript Offprint
arXiv:2610.33691PathKGen: Pathology Knowledge Assisted MLLM for Explainable Histopathology
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
Whole Slide Image (WSI) analysis serves as the fundamental method for the clinical diagnosis of cancer in digital histopathology. Recent advances in Multimodal Large Language Models (MLLMs) have enabled state-of-the-art (SOTA) automated histopathology report generation. However, MLLMs reason purely through distributions encoded in their neural parameters, limiting the amount of knowledge and reasoning logic they can contain given the model scale. Their black-box reasoning poses another challenge to the human interpretation of intermediate reasoning. We address these issues by utilizing knowledge graphs to inject external structured knowledge for MLLMs to reason over, while making this reasoning component visible. Knowledge graphs are capable of partially externalizing the containment of medical knowledge, an area that remains underexplored in pathology report generation. We introduce PathKGen, a knowledge graph-assisted MLLM for histopathology report generation. PathKGen has two main branches: (1) a visual path that learns visual token inputs to the MLLM using pathology foundation models, and (2) a knowledge path that learns knowledge token inputs by extracting key morphological features of WSIs through querying a pathology-specific knowledge graph. A comprehensive evaluation on WSI-Bench dataset shows that PathKGen surpasses previous SOTA methods while revealing diagnostic reasoning as visually intuitive graphs. Due to its modular design, the proposed knowledge path is complementary to vision-aligned MLLMs and can be extended to other applications by curating domain-specific knowledge graphs to generate knowledge tokens. Source code is available at https://github.com/nadunnr/PathKGen.
1. Introduction
Histopathology serves as the foundation for cancer diagnosis, with Whole Slide Images (WSIs) capturing rich multi-

PathKGen Output:
Microscopic observation of the pathology slide reveals a moderately differentiated squamous cell carcinoma characterized by sheets of atypical squamous cells with intercellular bridges and keratinization. The tumor cells exhibit moderate nuclear pleomorphism with prominent nucleoli. Mitotic figures are present, indicating a moderate rate of cell division. There is no evidence of vascular invasion or necrosis within the examined tissue. Based on these observations, the diagnosis is squamous cell carcinoma.
Figure 1. PathKGen is a vision-language assistant for generating histopathology reports while exposing the intermediate decision-making in a graphically intuitive, human readable format, thus improving explainability and encouraging clinical adoption.
scale morphological patterns at gigapixel resolution. Recent expansions in publicly available pathology datasets [11, 17, 35] and availability of pathology foundation models [5, 8, 24] have popularized deep-learning based computational pathology workflows across a wide range of tasks such as zero-shot classification [31], visual question answering (VQA) [29], and copilot assistant systems for pathology analysis [6, 25]. Recent adaptations of Multimodal Large Language Models (MLLMs) for pathology have demonstrated strong performance in automated report generation [9, 17, 26, 29]. However, existing models reason purely based on the distributions stored in the form of weights, which poses three fundamental limitations.
The first limitation in recent slide-level MLLMs is their explainability. Prior works have trained on both closed-ended and open-ended VQA pairs which resulted in models that generate only final answers such as keywords
These authors contributed equally to this work.
Correspondence: range@uom.lk or captions, without providing any underlying reasoning [4, 6]. Their decision-making processes operate as black-box models, lacking transparency and human interpretability, which limits users from confidently trusting model outputs [19, 25, 32]. WSI-LLaVA [17] has attempted to improve explainability by incorporating morphological descriptions into the MLLM output. Yet its underlying reasoning remains largely implicit and parameter-bound. Greater explainability is therefore required to adopt trustworthy models into clinical settings. While medical experts naturally provide comprehensive reasoning alongside their diagnoses, the lack of explanatory depth in current models restricts physicians from confidently adopting and validating these WSI-level MLLMs [19, 22].
Secondly, MLLMs entirely handle the containment of domain knowledge and reasoning logic which binds the performance to the model scale. Because this knowledge is encoded directly within the model's weights, modifying the system with updated medical knowledge requires thorough fine-tuning and is computationally expensive. Thus, a knowledge reference technique analogous to that of a pathologist referring to a medical textbook is required for efficient adoption. In regard to this, medical Retrieval Augmented Generation (RAG) systems have proven to be versatile [36], yet their contained knowledge is stored as vector representations making them impossible to comprehend and inconvenient to edit manually.
The third challenge is that MLLMs are trained on pathologist-authored reports, which are inherently noisy and show reporting bias. WSI-Agents [26] has utilized multi-agent systems to validate the internal reasoning logic of generated reports. Nevertheless, it relies on a combination of different MLLMs, thus remaining susceptible to noisy evidence propagation and increases overall parameter complexity, further compounding the aforementioned limitations.
Knowledge graphs have emerged as a promising solution to outsourcing knowledge containment, gaining prominence as a widely employed data structure in medical deep learning systems [14, 16, 23]. Their graphical representation is also capable of providing human interpretable visual intuition, which is ideal for explainability. However, their use for pathology knowledge containment and explainability is underexplored. Prior work [27] has used pathology knowledge graphs to guide the VQA tasks. Still, it directly encodes the extracted graph into dense embeddings, which nullifies human readability and violates transparency. As a comprehensive biomedical knowledge resource, the Unified Medical Language System (UMLS) [1] integrates diverse medical concepts into a knowledge graph, that has been widely utilized across a broad range of clinical NLP tasks [11, 40]. The integration of UMLS into medical domain pipelines capitalizes on a rigorously curated and standardized biomedical ontology, substantially reducing semantic noise, structural inconsistencies, and credibility risks associated with building a knowledge graph from the first principles.
In this paper, we build on the success of MLLMs and the credible medical knowledge accumulated by the UMLS database, to propose PathKGen, a knowledge graph guided MLLM which generates histopathology report text given a digital WSI as input. Our model tackles the limitations in existing MLLM based report generation models by revealing the intermediate reasoning through visually intuitive graphs, partially outsourcing the visual discrimination logic and knowledge containment, and providing a credible information signal to the MLLM. In our pipeline, slide-level features of the WSI are first extracted through pathology foundation models. We then extract characteristic morphological features of the histology present in the WSI, from a pathology specific knowledge graph derived from UMLS. The extracted subgraph is revealed to the user as shown in Fig. 1. Finally, the MLLM is finetuned for accurate generation of report text by providing the slide feature tokens (visual tokens) and extracted morphological feature tokens (knowledge tokens) as input. We demonstrate that revealing intermediate decision making in a graphical format aids in improving explainability of the generated report.
While our methodology emphasizes explainability, we also conduct studies on performance gains acquired through integrating a knowledge graph with an MLLM. We present standard natural language understanding (NLU) scores as well as the benchmark introduced in [17] which are based on LLM-as-a-Judge techniques. Ablation studies show that the knowledge branch improves both model explainability and output quality at a given model scale, enabling smaller models to be on par with state-of-the-art (SOTA) models. We also outline the procedure for curating the pathology domain-specific knowledge graph from credible sources, which could be extended to other diagnostic fields. To the best of our knowledge, our method is the first to incorporate knowledge graphs for human interpretable pathology report generation. Our key contributions are summarized as follows:
-
We introduce a novel knowledge graph-assisted MLLM model architecture for pathology report generation, given the WSI.
-
We outline a methodology for curating a pathology-specific knowledge graph derived from the UMLS database.
-
We conduct comprehensive evaluation of our pipeline, and show that our methodology not only improves explainability, but also yields superior performance across all evaluated metrics, surpassing SOTA baselines.

Figure 2. Overall pipeline architecture showing the connection of visual path (in blue) and knowledge path (in yellow). Slide features are extracted using CONCH and TITAN (jointly serving as the vision encoder), and projected into the same semantic space of the MLLM. An auxiliary classifier predicts the histology in the WSI, which is subsequently used to query the knowledge graph and retrieve knowledge about morphological features. Visual tokens (v), knowledge tokens (k) and instruction prompt (p) are given to the MLLM as input. See Sec. 3 for detailed methodology.
2.1. MLLMs for WSI Analysis
Recent use of MLLMs for WSI-level analysis and report generation demonstrate methods to overcome the gigapixel scale processing of WSIs. SOTA models adopt pathology specific vision foundation models as feature extractors. The standard routine follows the aggregation of patch level features extracted through patch encoders such as CONCH [24], and UNI [5], using transformer based slide encoder architectures like TITAN [8], PRISM [30], and Madeleine [13]. The single slide-level representation tokens are linearly projected into the same semantic space of the MLLM following the LLaVA-style architecture. The visual tokens are combined with prompt tokens from the input to the MLLM, and is used to generate the report autoregressively. SlideChat [6], Quilt-LLaVA [29], and WSI-LLaVA [17] have adopted this standard framework.
2.2. Domain Knowledge Integrated WSI Analysis
Incorporating domain knowledge into WSI analysis has emerged as a promising direction for improving both predictive performance and interpretability. K-PathVQA [27] has used pathology knowledge graphs to guide the VQA task. It directly encodes the extracted graph into dense embeddings, which nullifies human readability and violates transparency. More recently, knowledge-enhanced WSI frameworks have explored explicit alignment between pathological concepts and tissue representations. For example, FOCUS [10] aligns medical knowledge concepts with WSI regions to facilitate concept-aware feature compression and improve few-shot classification performance.
Similarly, MulGT [38] introduces task-specific knowledge injection and domain-guided graph pooling to capture diagnostically relevant tissue patterns across multiple pathology tasks. Despite these advances, existing methods primarily focus on improving classification or representation learning, while the integration of structured medical knowledge into pathology report generation remains unexplored. Our work addresses this gap by leveraging a pathology-specific knowledge graph to provide explicit, human-interpretable reasoning pathways for MLLM-based histopathology report generation.
3. PathKGen
The complete pipeline of PathKGen is illustrated in Fig. 2. Given an input WSI, the pipeline carries out two parallel pathways of processing to feed tokens to the MLLM and generate report text. The visual pathway first processes the WSI through pathology foundation models to extract slide features, which are then passed into a projection layer to get
(a)

(b)

(c)
Figure 3. (a) Detailed working example of the how the subgraph is extracted, starting from the WSI. The auxiliary classifier predicts the histology class using slide embeddings and anatomical site, which acts as the anchor node for querying the pathology knowledge graph. This returns a fixed deterministic subgraph containing the canonical morphology profile of the predicted histology, which is then organized into structured text and tokenized. See Sec. 3.2 for explanation of detailed working. (b) Comparison of the extracted subgraph with the base knowledge graph. (c) Distribution of the 6 categories of relations in our curated pathology knowledge graph.
visual tokens. In parallel to the visual path, the knowledge path utilizes an auxiliary classifier module, which predicts the histology given the extracted slide features and the primary site of the WSI. Predicted histology is used as the anchor node to extract a subgraph from the curated knowledge graph by retrieving adjacent nodes. This subgraph is an intermediate result visible to the user in a graphical format (See Fig. 1). Finally, The extracted nodes and edge relations are then converted to structured text and appended to the MLLM input as knowledge tokens along with visual tokens to generate the report for a given instruction. The complete pipeline is trained in as an auto-regressive next-token prediction task [15], using the ground truth report text.
3.1. Visual Path
Leveraging the superior feature representation capabilities of pathology foundation models, we adopt CONCHv1.5 vision encoder [24] to extract 768-dimensional patch features from WSIs. To aggregate the patch features into a single slide-level representation, we use the TITAN slide encoder [8], which outputs slide tokens x of size . Following the auto-regressive LLaVA architecture [20], the slide tokens x are projected into the semantic space of the MLLM by passing through a modality projection layer, which consists of a two-layer Multi-Layer Perceptron (MLP) block. The resulting projected visual tokens v are combined with the prompt and fed into the MLLM. Simultaneously, to train the auxiliary classifier, slide tokens are pooled through an attention mechanism [8] and extracted as 768-dimensional slide embeddings denoted by .
3.2. Knowledge Path
The fundamental task of the knowledge path is to predict the histology in the WSI, retrieve the canonical morphological profile of that class from the knowledge graph and feed it into the MLLM in a structured format. This enhances the MLLM's ability to learn discriminative histological features while making its decisions human-readable and partially externalizes knowledge containment to the knowledge path.
Auxiliary Classifier. For weakly supervised training of the auxiliary classifier, we first prepare histology class label h and primary site label for each WSI using the metadata available through The Cancer Genome Atlas (TCGA) [35] portal. To aid the classifier differentiate between similar carcinomas arising at different organs, we also feed primary site as an input in the form of a learnable embedding, s. This approach mimics the clinical workflow, where pathologists narrow down potential histologies based on the primary site. We notice that this support from the available metadata enables the classifier to achieve a higher classification accuracy, compared to without. We then train a lightweight MLP head to predict the histology class conditioned on the concatenated slide embedding and site embedding, as shown in Equation 1.
where H defines the set of all possible histology classes and denotes the probability function.
We train the auxiliary classifier for 31 histology classes (including variants) with the help of 52 primary sites. The

Figure 4. Knowledge graph curation pipeline. Morphological features are extracted from ground-truth histopathology reports for each histology class and mapped to UMLS concepts using a biomedical concept alignment model. Then semantic relations between histology classes and morphological concepts are assigned based on UMLS semantic types. The resulting knowledge graph is subsequently reviewed and verified by expert pathologists. See Sec. 3.4 for more detailed description.
Table 1. Ablation of auxiliary histology classification. Combining slide embeddings with primary site improves performance over either input alone. Abbreviations: Emb. (Embedding), Acc. (Accuracy), Prec. (Precision), Rec. (Recall), F1 (Macro-F1).
| Input | Acc. | Prec. | Rec. | F1 |
|---|---|---|---|---|
| Primary site only | 0.8416 | 0.6764 | 0.7393 | 0.6941 |
| Slide emb. only | 0.9356 | 0.8685 | 0.8873 | 0.8754 |
| Slide emb. + site | 0.9752 | 0.9656 | 0.9848 | 0.9711 |
size of the learnable site embedding is chosen to be 16-dimensional. The auxiliary classifier is trained separately, prior to training the MLLM, under cross-entropy loss. It achieves an overall accuracy of and a macro-averaged F1 score of 0.97, demonstrating balanced performance across all histology classes. Table 1 shows that primary site alone achieves a Macro-F1 of 0.6941, while slide embedding alone achieves 0.8754. Combining both improves Macro-F1 to 0.9711, indicating that primary-site information provides complementary discriminative information to the visual slide representation. Per-class scores and confusion matrix (Appendix A) confirm high accuracy under prevailing class imbalance.
Querying the Knowledge Graph. We query for knowledge from the curated knowledge graph, derived from UMLS, using the predicted histology of each WSI as the anchor node. Denoting the knowledge graph as and anchor node , we retrieve the one-hop induced neighborhood subgraph of , which is a tree denoted by . The leaf nodes of are morphological features of the histology , while the edges of represent the semantic relations between the histology and each mor- phological feature. These semantic relations fall into 6 categories as shown in Fig. 3, namely, found in, growth pattern, cytological feature, nuclear feature, background feature and invasion pattern. This categorization of links helps to organize the morphological features into a structured text format. This text is then tokenized and fed into the MLLM as knowledge input k. We adopt the text structure shown in Fig. 3, as it is highly compatible with the chosen MLLM. Furthermore, the knowledge retrieved from G can be shown as a visually intuitive graph.
The retrieved subgraph is class-conditional and deterministic: two slides assigned the same histology receive identical knowledge tokens k. Slide-specific content enters the report only through the visual tokens v, against which the MLLM confirms, negates, or omits each retrieved candidate morphology during generation. This mirrors the clinical practice, where a pathologist narrows to a likely entity, recalls the features that define it, and then checks the slide for each one.
3.3. Language Model
We adopt Qwen2.5-7B-Instruct model as our MLLM decoder due to its capability of working with multi-modal data [33]. However, Vicuna [39] and LLama3 [34] have also been proven to be capable for this task [6]. Inspired from LLaVA-style training [20], the training is performed in two stages. First, we train only the projection layer while keeping the MLLM backbone frozen for the purpose of semantic space alignment. Subsequently, we load the unfrozen MLLM using QLoRA [7] for parameter efficient visual instruction tuning and train both the projection layer and MLLM as an auto-regressive next token prediction task. The input to the model is a single unified prompt consisting of the visual tokens , knowl-
(a)


(b)
(c)

"Microscopic observation of the pathology slide reveals a high-grade urothelial carcinoma characterized by poorly differentiated tumor cells infiltrating the bladder wall, extending through the muscularis propria into the perivesical adipose tissue. The tumor cells exhibit marked nuclear pleomorphism with prominent nucleoli and frequent mitotic figures, indicating a high rate of cell division. There is evidence of lymphovascular invasion, as tumor cells are present within lymphatic and blood vessels, suggesting potential for metastatic spread. Necrosis is observed within the tumor mass, indicating areas of tumor cell death. Based on these observations, the diagnosis is high-grade (G3) urothelial carcinoma."
"Microscopic observation of the pathology slide reveals poorly differentiated epithelial cells infiltrating the surrounding stroma with minimal formation of glandular structures, significantly deviating from normal tissue architecture. The nuclei exhibit marked variability in size and shape, indicative of high nuclear pleomorphism. There is a high rate of cell division observed, corresponding to a high mitotic count. Vascular invasion is present, as evidenced by tumor cells within blood vessels. Areas of necrosis are evident within the tumor. Based on these observations, the diagnosis is invasive ductal carcinoma, poorly differentiated, histologic grade 3."
"Microscopic observation of the pathology slide reveals a moderately differentiated squamous cell carcinoma characterized by irregular nests and sheets of atypical squamous cells with intercellular bridges and keratinization. The tumor cells exhibit moderate nuclear pleomorphism with prominent nucleoli. Mitotic figures are present, indicating a moderate rate of cell division. There is no evidence of vascular invasion or necrosis within the examined tissue. Based on these observations, the diagnosis is squamous cell carcinoma, moderately differentiated."
Figure 5. Qualitative visualization of sample model predictions, highlighting the extracted feature nodes (in comparison to the entire knowledge graph) which are explicitly reflected in the generated report. Predicted carcinoma is highlighted in blue. Features present in the WSI are highlighted in green, while features with no evidence are highlighted in red. See Sec. 4.3 for the interpretation. Node labels are omitted for clarity and could be toggled on using graph visualization software. The color coding is a post-hoc formatting processed using rule-based text matching. Additional examples with node labels are provided in Appendix E.
edge tokens k, and the instruction prompt p. The confidence of the auxiliary classifier is explicitly stated in the instruction prompt p. This prevents the MLLM from solely relying on the classifier output. The model is trained to predict the output .
The unified prompt P is masked to create the training labels, such that when predicting the , visual and knowledge tokens are attended. The training objective of cross entropy loss for the next token given P is augmented with an adaptive weighting which prioritizes challenging examples (examples which score low in NLU metrics) by increasing their loss contribution while down-weighting trivial examples [2].
3.4. Knowledge Graph Curation
The knowledge graph was curated with data derived from the UMLS Metathesaurus [1]. We utilize GPT-4o [12] to extract crucial morphological features for each histology class from ground truth reports of WSI-Bench [17], and link each terminology to UMLS concepts using SapBERT [18], which is a pre-trained framework that aligns biomedical text into UMLS concepts. We then filter the matched concepts by the frequency of occurrence to remove matches which are likely to be noise. Finally, by considering the UMLS semantic type and the path connecting each morphological feature to the histology class, we use GPT-4o [12] to categorize each semantic relation into one of the 6 relations. Consequently, we verify the integrity of the curated knowledge graph by pathologists.
The curated knowledge graph has 177 nodes and 317 edges. Nodes consist of histologies and morphological features, while edges are of 6 categories as shown in Fig. 3. Statistical analysis shows a sparse yet cohesive graph, characterized by graph density of 0.01 and average node outdegree of 1.79. Fig. 3 (b) also depicts the distribution of edges across the 6 categories of relations in the knowledge graph.
Table 2. Quantitative comparison of existing models on the report generation task of the WSI-Bench [17] dataset. PathKGen outperforms the existing WSI MLLMs in multiple metrics. The results are as reported in WSI-Agents [26], and WSI-LLaVa [17]. See Sec. 4.1 for detailed analysis. Abbreviations: B-1/B-2/B-3/B-4 (BLEU-1/2/3/4), R-L (ROUGE-L), M (METEOR), W-P (WSI-Precision).
| Models | B-1 | B-2 | B-3 | B-4 | R-L | M | W-P |
|---|---|---|---|---|---|---|---|
| GPT-4o [12] | 0.202 | 0.069 | 0.030 | 0.016 | 0.132 | 0.167 | 0.067 |
| Quilt-LLaVA [29] | 0.334 | 0.170 | 0.093 | 0.057 | 0.246 | 0.291 | 0.324 |
| MI-Gen [3] | 0.403 | 0.306 | 0.248 | 0.209 | 0.446 | 0.407 | 0.310 |
| Hist-Gen [9] | 0.406 | 0.307 | 0.248 | 0.208 | 0.448 | 0.416 | 0.300 |
| WSI-Agents [26] | 0.444 | 0.308 | 0.231 | 0.183 | 0.448 | 0.472 | 0.440 |
| WSI-LLaVA [17] | 0.480 | 0.358 | 0.287 | 0.240 | 0.490 | 0.465 | 0.380 |
| PathKGen | 0.512 | 0.389 | 0.316 | 0.261 | 0.519 | 0.485 | 0.480 |
Table 3. Ablation study of the knowledge pathway. The vision pathway is retained in all conditions, while the information supplied through the knowledge pathway is varied. All models are evaluated at the 7B parameter scale. See Sec. 4.4 for further details. Abbreviations: H (predicted histology), PS (primary site), MF (morphological features), B-1/B-2/B-3/B-4 (BLEU-1/2/3/4), R-L (ROUGE-L), M (METEOR), W-P (WSI-Precision).
| Knowledge-path input | B-1 | B-2 | B-3 | B-4 | R-L | M | W-P |
|---|---|---|---|---|---|---|---|
| None | 0.4922 | 0.3745 | 0.3063 | 0.2548 | 0.5185 | 0.4730 | 0.4661 |
| Predicted histology (H) | 0.5020 | 0.3805 | 0.3088 | 0.2558 | 0.5174 | 0.4789 | 0.4570 |
| Primary site (PS) only | 0.4959 | 0.3773 | 0.3072 | 0.2549 | 0.5142 | 0.4750 | 0.4480 |
| PathKGen (H + PS + MF) | 0.5122 | 0.3885 | 0.3154 | 0.2611 | 0.5194 | 0.4849 | 0.4802 |
Table 4. Parameter-efficiency study of the knowledge pathway. Integrating external pathology knowledge enables lower-parameter MLLMs to achieve competitive performance, allowing smaller models to approach the performance of substantially larger models and SOTA systems. Values enclosed in parentheses denote the model parameter size in billions. See Sec. 4.4 for further evaluation details. Abbreviations: B-1/B-2/B-3/B-4 (BLEU-1/2/3/4), R-L (ROUGE-L), M (METEOR), W-P (WSI-Precision), V (Vision), K (Knowledge).
| Method | B-1 | B-2 | B-3 | B-4 | R-L | M | W-P |
|---|---|---|---|---|---|---|---|
| V path only (7B) | 0.4922 | 0.3745 | 0.3063 | 0.2548 | 0.5185 | 0.4730 | 0.4661 |
| (V + K) path (1.5B) | 0.4792 | 0.3607 | 0.2930 | 0.2426 | 0.5040 | 0.4562 | 0.4290 |
| (V + K) path (3B) | 0.4950 | 0.3723 | 0.3011 | 0.2484 | 0.5082 | 0.4719 | 0.4428 |
| (V + K) path (7B) (PathKGen) | 0.5122 | 0.3885 | 0.3154 | 0.2611 | 0.5194 | 0.4849 | 0.4802 |
3.5. Dataset and Training.
We use the WSI-Bench dataset [17], which was curated from TCGA [35], as our primary dataset for the report generation pipeline. The report generation sub-task of this dataset includes 9749 training pairs and 208 test pairs, each consisting of a WSI and its corresponding pathology report. From that, a total of 9452 slides were used after removing slides which do not include microns per pixel value. For weakly supervised training of the auxiliary classifier, we derive histology labels from WSI reports using rule-based text processing and obtain primary-site metadata from TCGA. Extracted labels were cross-validated against labels available from the TCGA portal. The result is a supplementary dataset containing WSIs paired with primary site inputs and the histology classes as ground truth labels.
4. Experiments
4.1. Quantitative Results on WSI-Bench Dataset.
We evaluate our method against existing WSI MLLMs under the report generation task of the WSI-Bench dataset [17]. As presented in Table 2, PathKGen outperforms existing MLLMs including MI-Gen [3], HistGen [9], WSI-LLaVA [17] and WSI-Agents [26], in multiple metrics. Specifically, our model achieves notable relative improvements across five standard NLU scores: BLEU-1 by 6.67%, BLEU-2 by 8.66%, BLEU-3 by 10.10%, BLEU-4 by 8.75%, ROUGE-L by 5.92%, and METEOR by 2.75%.
Furthermore, as histopathology report generation is a domain characterized by complex and highly nuanced terminology, standard NLU metrics alone are inadequate to comprehensively assess report quality. To rigorously eval-uate performance in this context, we employ an LLM-as-a-Judge metric: WSI-Precision introduced in [17], which evaluates the accuracy of generated reports by verifying the model predictions against the ground truth claims. Our approach achieves a WSI-Precision of 0.480, outperforming the SOTA by 9.09%. These results demonstrate that PathK-Gen surpasses existing methods by significant margins.
4.2. Evaluation on Semantic Alignment
We evaluated our model outputs using BERTScore, a deep learning based metric that measures the semantic alignment between the ground truth and the generated text [37]. PathKGen achieves a BERTScore F1 of 0.9081 with RoBERTa-large model [21] and 0.8836 with DistilBERT model [28]. Hallucinations or omissions of critical medical terms would be reflected by a significant decrease in BERTScore. Our consistently high BERTScore indicates strong semantic alignment with the ground truth and minimal factual distortion. In comparison, WSI-LLaVA achieves a BERTScore of 0.9068 for RoBERTa-large. These findings suggest that the MLLM is robust to uncertainty in the classifier outputs, with no observable degradation in report quality.
4.3. Qualitative Results Interpretation
Fig. 5 shows selected outputs from the model for qualitative analysis. We observe that the key morphological descriptors of the carcinoma illustrated by the subgraph are reflected in the generated report. In Fig. 5 (a), the subgraph features and descriptors in the report show high overlap, meaning the MLLM faithfully adapts to the information provided by the knowledge path.
As illustrated in Fig. 5 (b), the MLLM also learns novel connections absent from the knowledge graph (isolated green nodes), demonstrating the partial externalization of its internal knowledge. Since trivial characteristics are consistently supported by the knowledge path, the model parameters instead learn more complex relationships between visual descriptors and carcinomas. Furthermore, the MLLM learns negation rules, whereby the absence of specific morphological features serves as positive diagnostic evidence for certain histologies. This is confirmed by isolated red nodes in Fig. 5 (c), indicating that absent features remain disconnected from the corresponding histology node.
4.4. Ablation Studies
We ablate the contribution of the knowledge path at the 7B parameter scale. Compared with the vision-only baseline, PathKGen improves BLEU-4 by 2.47%, METEOR by 2.52%, and WSI-Precision by 3.03% as shown in Table 3. To determine whether these gains are merely from conditioning on the auxiliary classifier output or primary site metadata, we additionally evaluate variants where the knowledge pathway receives only the predicted histology or only the primary site. PathKGen consistently outperforms both baselines, indicating that the richer structured knowledge, including the subgraph relations and associated morphological features, provides complementary information beyond histology or site conditioning alone.
Table 5. Counterfactual knowledge-graph interventions at inference time. We perturb the knowledge supplied to a fixed trained PathKGen model to evaluate its sensitivity to the retrieved knowledge. The model's improved report-generation performance with correct knowledge and its degradation under corrupted knowledge provide evidence that it meaningfully utilizes the retrieved knowledge. Abbreviation: W-P (WSI-Precision).
| Intervention | W-P |
|---|---|
| Predicted histology anchor (default) | 0.4802 |
| Oracle histology anchor | 0.4830 |
| Random-wrong histology anchor | 0.2540 |
Further, the counterfactual interventions in Table 5 show that oracle knowledge slightly improves performance, whereas random incorrect histology anchors substantially degrade WSI-Precision, confirming that the model meaningfully utilizes the supplied knowledge.
To understand the amount of knowledge externalization handled by the knowledge path, we compare three model sizes with the same knowledge path architecture (Table 4). Lower-parameter models achieve performance comparable to 7B SOTA, supporting that visual discrimination logic and knowledge containment of the MLLM have become partially externalized to the knowledge path. Inevitably, scaling the model size gives a greater observable performance gain than from the knowledge path. However, partial externalization of domain knowledge not only improves the explainability but also increases the model performance at a given scale, by providing an external guidance to the MLLM.
5. Conclusion
We presented a knowledge graph-assisted MLLM for pathology report generation with human-readable intermediate results, demonstrating a methodology for curating a credible pathology knowledge graph with outsourced knowledge containment and integrating it into a standard MLLM architecture. To the best of our knowledge, this is the first method to do so. Experiments on a benchmark dataset showed superior performance over existing models, while ablations confirm the effectiveness of the knowledge-addition methodology. We leave generalizing this method to other diagnostic routines as future work.
References
[1] Olivier Bodenreider. The unified medical language system (umls): integrating biomedical terminology. Nucleic Acids Research, 32(2022):D267–D270, 2004. 2, 6
[2] Yapei Chang, Yekyung Kim, Michael Krumdick, Amir Zadeh, Chuan Li, Chris Tanner, and Mohit Iyyer. BLEU-BERI: BLEU is a surprisingly effective reward for instruction following. In Advances in Neural Information Processing Systems, 2025. 6
[3] Pingyi Chen, Honglin Li, Chenglu Zhu, Sunyi Zheng, Zhongyi Shui, and Lin Yang. Wsicaption: Multiple instance generation of pathology reports for gigapixel whole-slide images. In International Conference on Medical Image Computing and Computer-Assisted Intervention, pages 546–556. Springer, 2024. 7
[4] Pingyi Chen, Chenglu Zhu, Sunyi Zheng, Honglin Li, and Lin Yang. Wsi-vqa: Interpreting whole slide images by generative visual question answering. In European Conference on Computer Vision, pages 401–417. Springer, 2025. 2
[5] Richard J Chen, Tong Ding, Ming Y Lu, Drew FK Williamson, Guillaume Jaume, Andrew H Song, Bowen Chen, Andrew Zhang, Daniel Shao, Muhammad Shaban, et al. Towards a general-purpose foundation model for computational pathology. Nature Medicine, 30(3):850–862, 2024. 1, 3
[6] Ying Chen, Guoan Wang, Yuanfeng Ji, Yanjun Li, Jin Ye, Tianbin Li, Ming Hu, Rongshan Yu, Yu Qiao, and Junjun He. Slidechat: A large vision-language assistant for whole-slide pathology image understanding. In Proceedings of the IEEE/CVF Computer Vision and Pattern Recognition Conference, pages 5134–5143, 2025. 1, 2, 3, 5
[7] Tim Dettmers, Artidoro Pagnoni, Ari Holtzman, and Luke Zettlemoyer. Qlora: Efficient finetuning of quantized llms. In Advances in Neural Information Processing Systems, pages 10088–10115. Curran Associates, Inc., 2023. 5
[8] Tong Ding, Sophia J Wagner, Andrew H Song, Richard J Chen, Ming Y Lu, Andrew Zhang, Anurag J Vaidya, Guillaume Jaume, Muhammad Shaban, Ahrong Kim, et al. A multimodal whole-slide foundation model for pathology. Nature Medicine, pages 1–13, 2025. 1, 3, 4
[9] Zhengrui Guo, Jiabo Ma, Yingxue Xu, Yihui Wang, Liansheng Wang, and Hao Chen. Histgen: Histopathology report generation via local-global feature encoding and cross-modal context interaction. In International Conference on Medical Image Computing and Computer-Assisted Intervention, pages 189–199. Springer, 2024. 1, 7
[10] Zhengrui Guo, Conghao Xiong, Jiabo Ma, Qichen Sun, Lishuang Feng, Jinzhuo Wang, and Hao Chen. Focus: Knowledge-enhanced adaptive visual compression for few-shot whole slide image classification. In Proceedings of the Computer Vision and Pattern Recognition Conference, pages 15590–15600, 2025. 3
[11] Wisdom Ikezogwo, Saygin Seyfioglu, Fatemeh Ghezloo, Dylan Geva, Fatwir Sheikh Mohammed, Pavan Kumar Anand, Ranjay Krishna, and Linda Shapiro. Quilt-1m: One million image-text pairs for histopathology. Advances
in neural information processing systems, 36:37995–38017, 2023. 1, 2
[12] Raisa Islam and Owana Marzia Moushi. Gpt-4o: The cutting-edge advancement in multimodal llm. In Intelligent Computing, pages 47–60, Cham, 2025. Springer Nature Switzerland. 6, 7
[13] Guillaume Jaume, Anurag Vaidya, Andrew Zhang, Andrew H. Song, Richard J. Chen, Sharifa Sahai, Dandan Mo, Emilio Madrigal, Long Phi Le, and Faisal Mahmood. Multistain pretraining for slide representation learning in pathology. In European Conference on Computer Vision, pages 19–37. Springer, 2024. 3
[14] Pengcheng Jiang, Cao Xiao, Minhao Jiang, Parminder Bhatia, Taha Kass-Hout, Jimeng Sun, and Jiawei Han. Reasoning-enhanced healthcare predictions with knowledge graph community retrieval. In International Conference on Learning Representations, 2024. 2
[15] Hugo Laurençon, Leo Tronchon, Matthieu Cord, and Victor Sanh. What matters when building vision-language models? In Advances in Neural Information Processing Systems, 2024. 4
[16] Jiawen Li, Yuxuan Chen, Hongbo Chu, Qiehe Sun, Tian Guan, Anjia Han, and Yonghong He. Dynamic graph representation with knowledge-aware attention for histopathology whole slide image analysis. In Proceedings of the IEEE/CVF conference on Computer Vision and Pattern Recognition, pages 11323–11332, 2024. 2
[17] Yuci Liang, Xinheng Lyu, Wenting Chen, Meidan Ding, Jipeng Zhang, Xiangjian He, Song Wu, Xiaohan Xing, Sen Yang, Xiyue Wang, and Linlin Shen. WSI-LLaVA: A multimodal large language model for whole slide image. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 22718–22727, 2025. 1, 2, 3, 6, 7, 8
[18] Fangyu Liu, Ehsan Shareghi, Zaiqiao Meng, Marco Basaldella, and Nigel Collier. Self-alignment pretraining for biomedical entity representations. In Proceedings of the 2021 conference of the North American Chapter of the Association for Computational Linguistics: human language technologies, pages 4228–4238, 2021. 6
[19] Fenglin Liu, Hongjian Zhou, Boyang Gu, Xinyu Zou, Jinfu Huang, Jinge Wu, Yiru Li, Sam S Chen, Yining Hua, Peilin Zhou, et al. Application of large language models in medicine. Nature Reviews Bioengineering, 3(6):445–464, 2025. 2
[20] Haotian Liu, Chunyuan Li, Qingyang Wu, and Yong Jae Lee. Visual instruction tuning. In Advances in Neural Information Processing Systems, pages 34892–34916. Curran Associates, Inc., 2023. 4, 5
[21] Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. Roberta: A robustly optimized BERT pretraining approach. CoRR, abs/1907.11692, 2019. 8
[22] Pilar López-Úbeda, Teodoro Martín-Noguerol, José Aneiros-Fernández, and Antonio Luna. Natural language processing in pathology: current trends and future insights. The American Journal of Pathology, 192(11):1486–1495, 2022. 2
[23] Peiliang Lou, Yuxin Dong, Caixia Ding, Chunbao Wang, Ruifeng Guo, XiaoBo Pang, Chen Wang, and Chen Li. Pathograph: A graph-based method for standardized representation of pathology knowledge. Scientific Data, 12(1): 872, 2025. 2
[24] Ming Y Lu, Bowen Chen, Drew FK Williamson, Richard J Chen, Ivy Liang, Tong Ding, Guillaume Jaume, Igor Odintsov, Long Phi Le, Georg Gerber, et al. A visual-language foundation model for computational pathology. Nature Medicine, 30(3):863–874, 2024. 1, 3, 4
[25] Ming Y Lu, Bowen Chen, Drew FK Williamson, Richard J Chen, Melissa Zhao, Aaron K Chow, Kenji Ikemura, Ahrong Kim, Dimitra Pouli, Ankush Patel, et al. A multimodal generative ai copilot for human pathology. Nature, 634(8033): 466–473, 2024. 1, 2
[26] Xinheng Lyu, Yuci Liang, Wenting Chen, Meidan Ding, Jiaqi Yang, Guolin Huang, Daokun Zhang, Xiangjian He, and Linlin Shen. WSI-Agents: A Collaborative Multi-Agent System for Multi-Modal Whole Slide Image Analysis. In proceedings of Medical Image Computing and Computer Assisted Intervention – MICCAI 2025. Springer Nature Switzerland, 2025. 1, 2, 7
[27] Usman Naseem, Matloob Khushi, Adam G. Dunn, and Jinman Kim. K-PathVQA: Knowledge-aware multimodal representation for pathology visual question answering. IEEE Journal of Biomedical and Health Informatics, 28(4):1886–1895, 2024. 2, 3
[28] Victor Sanh, Lysandre Debut, Julien Chaumond, and Thomas Wolf. Distilbert, a distilled version of bert: smaller, faster, cheaper and lighter. ArXiv, abs/1910.01108, 2019. 8
[29] Mehmet Saygin Seyfioglu, Wisdom O Ikezogwo, Fatemeh Ghezloo, Ranjay Krishna, and Linda Shapiro. Quilt-llava: Visual instruction tuning by extracting localized narratives from open-source histopathology videos. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 13183–13192, 2024. 1, 3, 7
[30] George Shaikovski, Adam Casson, Kristen Severson, Eric Zimmermann, Yi Kan Wang, Jeremy D Kunz, Juan A Retamero, Gerard Oakley, David Klimstra, Christopher Kanan, et al. Prism: A multi-modal generative foundation model for slide-level histopathology. arXiv preprint arXiv:2405.10254, 2024. 3
[31] Jiangbo Shi, Chen Li, Tieliang Gong, Yefeng Zheng, and Huazhu Fu. ViLa-MIL: Dual-scale vision-language multiple instance learning for whole slide image classification. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 11248–11258, 2024. 1
[32] Nirhoshan Sivaroopan, Chamuditha Jayanga Galapaththige, Chalani Ekanayake, Hasindri Watawana, Ranga Rodrigo, Chamira U.S. Edussooriya, and Dushan N. Waduwage. Uncertainty awareness enables efficient labeling for cancer subtyping in digital pathology. In Proceedings of the Winter Conference on Applications of Computer Vision (WACV), pages 589–598, 2025. 2
[33] Qwen Team. Qwen2.5: A party of foundation models, 2024. 5
[34] Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timothée Lacroix, Baptiste
Rozière, Naman Goyal, Eric Hambro, Faisal Azhar, Aurelien Rodriguez, Armand Joulin, Edouard Grave, and Guillaume Lample. Llama: Open and efficient foundation language models, 2023. 5
[35] John N. Weinstein, Eric A. Collisson, Gordon B. Mills, Kenna R. M. Shaw, Brad A. Ozenberger, Kyle Ellrott, Ilya Shmulevich, Chris Sander, and Joshua M. Stuart. The cancer genome atlas pan-cancer analysis project. Nature Genetics, 45(10):1113–1120, 2013. 1, 4, 7
[36] Peng Xia, Kangyu Zhu, Haoran Li, Tianze Wang, Weijia Shi, Sheng Wang, Linjun Zhang, James Y Zou, and Huaxiu Yao. Mmed-rag: Versatile multimodal rag system for medical vision language models. In International Conference on Learning Representations, pages 66188–66217, 2025. 2
[37] Tianyi Zhang, Varsha Kishore, Felix Wu, Kilian Q Weinberger, and Yoav Artzi. Bertscore: Evaluating text generation with bert. International Conference on Learning Representations, 2020. 8
[38] Weiqin Zhao, Shujun Wang, Maximus Yeung, Tianye Niu, and Lequan Yu. Mulgt: Multi-task graph-transformer with task-aware knowledge injection and domain knowledge-driven pooling for whole slide image analysis. In Thirty-Seventh AAAI Conference on Artificial Intelligence, AAAI 2023, Thirty-Fifth Conference on Innovative Applications of Artificial Intelligence, IAAI 2023, Thirteenth Symposium on Educational Advances in Artificial Intelligence, EAAI 2023, Washington, DC, USA, February 7-14, 2023, pages 3606–3614. AAAI Press, 2023. 3
[39] Lianmin Zheng, Wei-Lin Chiang, Ying Sheng, Siyuan Zhuang, Zhanghao Wu, Yonghao Zhuang, Zi Lin, Zhuohan Li, Dacheng Li, Eric Xing, Hao Zhang, Joseph E Gonzalez, and Ion Stoica. Judging llm-as-a-judge with mt-bench and chatbot arena. In Advances in Neural Information Processing Systems, pages 46595–46623. Curran Associates, Inc., 2023. 5
[40] Xiao Zhou, Xiaoman Zhang, Chaoyi Wu, Ya Zhang, Weidi Xie, and Yanfeng Wang. Knowledge-enhanced visual-language pretraining for computational pathology. In European Conference on Computer Vision, pages 345–362. Springer, 2024. 2
Supplementary Material
A. Analysis of Auxiliary Classifier.
Table 6. Per-class histology classification metrics for the auxiliary classifier evaluated on the test set.
| Class | Precision | Recall | F1-score | Support |
|---|---|---|---|---|
| Adrenocortical Carcinoma | 1.00 | 1.00 | 1.00 | 5 |
| Bladder Urothelial Carcinoma | 1.00 | 0.89 | 0.94 | 9 |
| Brain Lower Grade Glioma | 1.00 | 1.00 | 1.00 | 15 |
| Breast Invasive Carcinoma | 1.00 | 0.96 | 0.98 | 23 |
| Cervical Squamous Cell Carcinoma | 1.00 | 1.00 | 1.00 | 2 |
| Cholangiocarcinoma | 1.00 | 1.00 | 1.00 | 2 |
| Colon Adenocarcinoma | 1.00 | 1.00 | 1.00 | 8 |
| Endocervical Adenocarcinoma | 1.00 | 1.00 | 1.00 | 2 |
| Esophageal Carcinoma | 1.00 | 1.00 | 1.00 | 3 |
| Head and Neck Squamous Cell Carcinoma | 1.00 | 1.00 | 1.00 | 9 |
| Kidney Chromophobe | 1.00 | 1.00 | 1.00 | 2 |
| Kidney Renal Clear Cell Carcinoma | 1.00 | 1.00 | 1.00 | 11 |
| Kidney Renal Papillary Cell Carcinoma | 1.00 | 1.00 | 1.00 | 6 |
| Liver Hepatocellular Carcinoma | 1.00 | 1.00 | 1.00 | 7 |
| Lung Adenocarcinoma | 0.90 | 0.90 | 0.90 | 10 |
| Lung Squamous Cell Carcinoma | 0.90 | 0.90 | 0.90 | 10 |
| Lymphoid Neoplasm Diffuse Large B-cell Lymphoma | 1.00 | 1.00 | 1.00 | 2 |
| Mesothelioma | 1.00 | 1.00 | 1.00 | 2 |
| Ovarian Serous Cystadenocarcinoma | 0.67 | 1.00 | 0.80 | 2 |
| Pheochromocytoma | 1.00 | 1.00 | 1.00 | 4 |
| Prostate Adenocarcinoma | 1.00 | 1.00 | 1.00 | 9 |
| Rectum Adenocarcinoma | 1.00 | 1.00 | 1.00 | 4 |
| Sarcoma | 1.00 | 1.00 | 1.00 | 10 |
| Skin Cutaneous Melanoma | 1.00 | 1.00 | 1.00 | 9 |
| Stomach Adenocarcinoma | 1.00 | 1.00 | 1.00 | 8 |
| Thymoma | 1.00 | 1.00 | 1.00 | 4 |
| Thyroid Carcinoma | 1.00 | 1.00 | 1.00 | 10 |
| Uterine Carcinosarcoma | 0.50 | 1.00 | 0.67 | 2 |
| Uterine Corpus Endometrial Carcinoma | 1.00 | 0.90 | 0.95 | 10 |
| Uveal Melanoma | 1.00 | 1.00 | 1.00 | 2 |
| Accuracy | 0.98 | 202 | ||
| Macro Avg. | 0.97 | 0.98 | 0.97 | 202 |
| Weighted Avg. | 0.98 | 0.98 | 0.98 | 202 |
B. Training Details.
After segmenting the tissue region the whole slide images, are tiled into 512 × 512 patches at 20× magnification discarding the patches which does not include tissue regions. Then all the filtered patches are encoded with the CONCH v1.5 patch encoder. Patch level features are aggregated into slide representations using the TITAN slide encoder.
As mentioned in the paper training proceeds in two stages. In stage 1, only the projection layer is trained keeping the LLM backbone frozen, for 8 epochs with effective batch size 64, using Adam optimizer with learning rate and a weight decay of 0.01. In Stage 2, both projection layer and the LLM backbone are fine tuned with QLoRA, for one epoch with effective batch size 128, using AdamW optimizer with a learning rate of for the QLoRA-adapted LLM parameters, for the projection layer and a weight decay of 0.01. LoRA adapters use rank r = 128 and , with dropout

Figure 6. Confusion matrix for the auxiliary classifier (Sec. 3.2), evaluated on the test set
0.02, applied to the attention and MLP projection matrices. Additionally, we use 42 as the random seed for functions from every python class.
B.1. Adaptive Loss Formula
The training objective is per-token autoregressive cross entropy, computed only over the report segment of each sequence, with label smoothing applied:
where T is the set of unmasked token positions.
At periodic steps, the loss is reweighted using a BLEU-4-based hard example signal: the model greedily generates a report for each sample i, scores it against the reference , and computes a weight relative to a running baseline :
with initialized to 0.2 and the mean BLEU-4 over the mined micro-batch.
C. Multiple Run Statistics.
Table 7. Confidence intervals for PathKGen's report-generation metrics, computed over repeated evaluation runs. This indicates the metrics are stable and differences across knowledge path conditions are unlikely to be due to run to run variance alone. Abbreviations: B-1/B-2/B-3/B-4 (BLEU-1/2/3/4), R-L (ROUGE-L), M (METEOR), W-P (WSI-Precision).
| Metric | 95% CI |
|---|---|
| B-1 | (0.5094, 0.5138) |
| B-2 | (0.3852, 0.3911) |
| B-3 | (0.3122, 0.3185) |
| B-4 | (0.2580, 0.2645) |
| M | (0.4826, 0.4896) |
| R-L | (0.5179, 0.5203) |
| W-P | (0.4509, 0.4992) |
D. Prompt Template.
All models are trained and prompted using a format with three roles (system, user, assistant). The visual features from the TITAN slide encoder are inserted at the position of a pair of reserved markers, <image_start> and <image_end>, which are added to the tokenizer as special tokens. During training, only the tokens belonging to the assistant turn (i.e., the report or answer) are supervised; every token up to and including <im_start>|assistant is masked with a label of −100 so that the model learns to condition on the knowledge and question rather than to reconstruct them (Sec. B).
Generation Prompt
System: You are a pathology assistant specialized in analyzing whole slide images of tissue samples. Provide detailed, accurate diagnostic observations based on microscopic features.
User: <image_start><image_end>
Generic knowledge regarding histology type (97.52% accurate). The site is exact.
{knowledge}
Use to help, but verify visually.
{question}
Assistant: {answer}
Figure 7. Generation prompt template with knowledge guidance. During training, the pathologist-written report is given as the answer in the assistant turn; at inference, autoregressive next token generation begins from the assistant turn.
E. Qualitative Analysis.
Figure 8 shows additional qualitative visualization of sample model predictions with extracted feature nodes highlighted. Features present in the WSI are highlighted in green, while features with no evidence are highlighted in red. This formatting is done through rule-based text processing for post-hoc intuitive display of present and absent features. Tables 8, 9 and 10 compares generated reports from WSI-LLaVA and PathKGen against the ground truth sample. As evident qualitatively, PathKGen captures more semantics in the report than WSI-LLaVA.




"Microscopic observation of the pathology slide reveals a high-grade urothelial carcinoma characterized by poorly differentiated tumor cells infiltrating the bladder wall, extending through the muscularis propria into the perivesical adipose tissue. The tumor cells exhibit marked nuclear pleomorphism with prominent nucleoli and frequent mitotic figures, indicating a high rate of cell division. There is evidence of lymphovascular invasion, as tumor cells are present within lymphatic and blood vessels, suggesting potential for metastatic spread. Necrosis is observed within the tumor mass, indicating areas of tumor cell death. Based on these observations, the diagnosis is high-grade (G3) urothelial carcinoma."


"Microscopic observation of the pathology slide reveals a moderately differentiated squamous cell carcinoma characterized by irregular nests and sheets of atypical squamous cells with intercellular bridges and keratinization. The tumor cells exhibit moderate nuclear pleomorphism with prominent nucleoli. Mitotic figures are present, indicating a moderate rate of cell division. There is no evidence of vascular invasion or necrosis within the examined tissue. Based on these observations, the diagnosis is squamous cell carcinoma, moderately differentiated."
"Microscopic observation of the pathology slide reveals a moderately differentiated squamous cell carcinoma characterized by irregular nests and sheets of atypical squamous cells with intercellular bridges and keratinization. The tumor cells exhibit moderate nuclear pleomorphism with prominent nucleoli. Mitotic figures are present, indicating a moderate rate of cell division. There is no evidence of vascular invasion or necrosis within the examined tissue. Based on these observations, the diagnosis is squamous cell carcinoma, moderately differentiated."
"Microscopic observation of the pathology slide reveals sheets and nests of atypical lymphoid cells with large, hyperchromatic nuclei and prominent nucleoli. There is a high degree of nuclear pleomorphism, and mitotic figures are frequently observed, indicating a high rate of cell division. Areas of necrosis are present within the tissue. Based on these observations, the diagnosis is diffuse large B-cell lymphoma."
"Microscopic observation of the pathology slide reveals metastatic melanoma characterized by the presence of atypical melanocytic cells infiltrating the lymph node architecture. The tumor cells exhibit pleomorphic nuclei with prominent nucleoli and abundant eosinophilic cytoplasm. Mitotic figures are frequently observed, indicating a high rate of cell division. There is no evidence of vascular invasion or necrosis within the examined tissue. Based on these observations, the diagnosis is metastatic malignant melanoma."
Figure 8. Additional qualitative examples containing triplets of Whole Slide Image (WSI), activated graph nodes, and generated report. Green: evidence present in the WSI, red: evidence absent in the WSI, blue: predicted histology.
Table 8. Qualitative comparison of pathology reports generated by WSI-LLaVA and PathKGen models against the ground truth for a sample whole slide image.
| Model | Model Responses |
|---|---|
| WSI | |
| Ground Truth | Microscopic observation of the pathology slide reveals a presence of tumor cells forming irregular glandular structures that moderately deviate from the normal tissue architecture, consistent with moderate differentiation. The nuclei exhibit slight pleomorphism, with moderate variability in size and shape, and there is an intermediate rate of mitosis observed. Vascular invasion is not specified in the observations available, and there is no mention of necrosis or calcification. Based on these observations, the diagnosis is adenocarcinoma, moderately differentiated. |
| WSI-LLaVA | Microscopic observation of the pathology slide reveals a moderately differentiated adenocarcinoma characterized by irregular clusters of epithelial cells infiltrating the lung tissue. The tumor cells exhibit moderate glandular formation, deviating from normal alveolar architecture. The nuclei show moderate variability in size and shape, indicative of nuclear pleomorphism. There is no evidence of vascular invasion or necrosis within the observed slide. Based on these observations, the diagnosis is adenosquamous carcinoma, moderately-differentiated. |
| PathKGen | Microscopic observation of the pathology slide reveals a moderately differentiated adenocarcinoma characterized by irregular clusters of epithelial cells infiltrating the stroma, forming glandular structures that moderately deviate from normal tissue architecture. The nuclei exhibit moderate variability in size and shape, indicative of nuclear pleomorphism, and there is a moderate rate of cell division observed. There is no evidence of vascular invasion, necrosis, or calcification within the examined tissue. Based on these observations, the diagnosis is adenoc arcinoma, moderately differentiated. |
Green: findings present in the ground truth; Red: hallucinated or contradictory findings; Orange: ground truth findings omitted by the PathKGen model; Underlined: template language.
Table 9. Qualitative comparison of pathology reports generated by WSI-LLaVA and PathKGen models against the ground truth for a sample whole slide image.
| Model | Model Responses |
|---|---|
| WSI | |
| Ground Truth | Microscopic observation of the pathology slide reveals well-differentiated endometrioid carcinoma cells invading minimally into the myometrium. The architecture is predominantly glandular, exhibiting preserved tubule formation indicative of low-grade differentiation, corresponding to a FIGO Grade 1 classification. There is an absence of lymphovascular invasion, which is a favorable prognostic indicator. The tumor primarily shows superficial invasion with no significant features of atypical necrosis or calcification. Based on these observations, the diagnosis is well-differentiated endometrioid adenocarcinoma, FIGO Grade I. |
| WSI-LLaVA | Microscopic observation of the pathology slide reveals well-differentiated glandular structures with minimal deviation from normal endometrial gland architecture, consistent with a FIGO grade 1 classification. The tumor cells exhibit nuclear features ranging from intermediate to high-grade, indicating a nuclear grade of 2-3. There is no evidence of lymphovascular space invasion. The surrounding non-neoplastic endometrium appears atrophic. Based on these observations, the diagnosis is endometrioid adenocarcinoma, FIGO grade 2.carinoma. |
| PathKGen | Microscopic observation of the pathology slide reveals endometrioid adenocarcinoma characterized by well-differentiated glandular structures, consistent with a FIGO grade 1 classification. The tumor cells exhibit minimal nuclear atypia and a low rate of mitotic activity. There is no evidence of lymphovascular space invasion, and the tumor is confined to the endometrium without invasion into the myometrium. Based on these observations, the diagnosis is endometrial carcinoma, FIGO Grade 1. |
Green: findings present in the ground truth; Red: hallucinated or contradictory findings; Orange: ground truth findings omitted by the PathKGen model; Underlined: template language.
Table 10. Qualitative comparison of pathology reports generated by WSI-LLaVA and PathKGen models against the ground truth for a sample whole slide image.
| Model | Model Responses |
|---|---|
| WSI | |
| Ground Truth | Microscopic observation of the pathology slide reveals that the serous adenocarcinoma is characterized by high-grade papillary structures with areas of solid and glandular growth patterns. Tumor cells exhibit significant atypia with prominent nucleoli and high mitotic activity. Numerous psammoma bodies, which are concentrically calcified structures, are present throughout the specimen. There is widespread tumor necrosis and lymphovascular invasion, indicating aggressive behavior of the carcinoma. Reactive stromal changes, including fibrosis and secondary inflammation, are noted, suggesting a chronic inflammatory response. Additionally, foci of calcification are seen, which may correspond to previous necrotic or injured tissues. Based on these observations, the diagnosis is high-grade papillary serous carcinoma. |
| WSI-LLaVA | Microscopic observation of the pathology slide reveals a high-grade neoplasm characterized by the presence of malignant epithelial cells forming complex papillary structures with fibrovascular cores. The tumor cells exhibit marked nuclear atypia, including pleomorphic nuclei with prominent nucleoli and irregular nuclear contours. There is a high mitotic activity indicative of rapid cell division. Areas of necrosis are present, and there is evidence of vascular invasion within the lymphovascular spaces. The ovarian stroma shows infiltration by the tumor, and the tumoral cells extend to the serosal surfaces. Based on these observations, the diagnosis is high-grade mullerian-derived adenocarcinoma, papillay type. |
| PathKGen | Microscopic observation of the pathology slide reveals a high-grade serous carcinoma characterized by papillary and solid growth patterns. The tumor cells exhibit marked nuclear atypia with prominent nucleoli and frequent mitotic figures, indicating a high proliferative activity. There is evidence of lymphovascular invasion, as tumor cells are observed within vascular spaces. Necrosis is present within the tumor tissue, contributing to its heterogeneous appearance. Based on these observations, the diagnosis is serous adenocarcinoma, high grade. |
Green: findings present in the ground truth; Red: hallucinated or contradictory findings; Orange: ground truth findings omitted by the PathKGen model; Underlined: template language.

Figure 9. Curated Knowledge Graph