arXiv:2610.33691cs.CVOct 2026

Manuscript Offprint

arXiv:2610.33691

PathKGen: Pathology Knowledge Assisted MLLM for Explainable Histopathology

Nadun Rajapaksha, Sandun Herath, Devnith Wijesinghe, Isiri Amani Withanawasam, Hasindri Watawana, Ranga Rodrigo

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-

Figure

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.

†^{\dagger}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:

  1. We introduce a novel knowledge graph-assisted MLLM model architecture for pathology report generation, given the WSI.

  2. We outline a methodology for curating a pathology-specific knowledge graph derived from the UMLS database.

  3. 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

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.

References (38)