Abstract
Vision-Language Models (VLMs) are advancing computational pathology with superior visual understanding capabilities. However, current systems often reduce diagnosis to directly output conclusions without verifiable evidence-linked reasoning, which severely limits clinical trust and hinders expert error rectification. To address these barriers, we construct PathReasoner, the first large-scale dataset of whole-slide image (WSI) reasoning. Unlike previous work reliant on unverified distillation, we develop a rigorous knowledge-guided generation pipeline. By leveraging medical knowledge graphs, we explicitly align structured pathological findings and clinical reasoning with diagnoses, generating over 20K high-quality instructional samples. Based on the database, we propose PathReasoner-R1, which synergizes trajectory-masked supervised fine-tuning with reasoning-oriented reinforcement learning to instill structured chain-of-thought capabilities. To ensure medical rigor, we engineer a knowledge-aware multi-granular reward function incorporating an Entity Reward mechanism strictly aligned with knowledge graphs. This effectively guides the model to optimize for logical consistency rather than mere outcome matching, thereby enhancing robustness. Extensive experiments demonstrate that PathReasoner-R1 achieves state-of-the-art performance on both PathReasoner and public benchmarks across various image scales, equipping pathology models with transparent, clinically grounded reasoning capabilities.
Introduction: The Reasoning Gap in Computational Pathology
In computational pathology, Vision-Language Models (VLMs) have demonstrated impressive capabilities in interpreting gigapixel Whole-Slide Images (WSIs). However, a significant "reasoning gap" persists. Most existing models function as black boxes, providing diagnostic labels without the underlying clinical justification. For pathologists, a diagnosis is the culmination of a logical chain of evidence—identifying nuclear atypia, measuring mitotic activity, or observing architectural changes. Without this "Chain-of-Thought" (CoT), AI outputs lack the transparency required for clinical adoption and are susceptible to hallucinations.
Methodology: Knowledge-Guided Reasoning
To bridge this gap, PathReasoner-R1 introduces a framework that prioritizes logical consistency over simple label matching through a two-pronged approach: a novel dataset and a sophisticated training pipeline.
1. The PathReasoner Dataset
The foundation of this work is a new dataset of 22,153 samples. To ensure medical accuracy, the authors developed a knowledge-guided generation pipeline. By integrating two large-scale medical knowledge graphs (KGs)—PrimeKG for macro-scale clinical context and PathoGraph for micro-scale histological features—they extracted entities from real pathology reports. The pipeline identifies the shortest logical paths within the unified KG to generate high-quality reasoning samples that explicitly link visual findings to diagnoses.
2. Training PathReasoner-R1
The model, built on a SlideChat backbone, is trained in two distinct stages:
- Trajectory-Masked Supervised Fine-Tuning (SFT): Reasoning chains are randomly truncated during training, forcing the model to learn how to reconstruct the logical flow from any intermediate point rather than just memorizing templates.
- Knowledge-Guided Reinforcement Learning (GRPO): Using Group Relative Policy Optimization, the model is refined with a multi-granular reward function. Beyond rewarding correct answers, an Entity Reward mechanism verifies that the model's reasoning includes the correct medical entities as defined by the Knowledge Graph, ensuring the model's "thoughts" are grounded in established medical facts.
Key Results and Qualitative Analysis
PathReasoner-R1 achieves state-of-the-art performance across multiple benchmarks, including SlideBench and PathMMU. On the PathReasoner benchmark, it achieved an LLM Score of 2.583, nearly double that of specialized medical models like MedGemma.
Ablation studies highlight the importance of the reinforcement learning stage. The inclusion of the Entity Reward improved average accuracy on SlideBench-TCGA from 67.98% (SFT baseline) to 74.68%, demonstrating that guiding the model toward logical consistency directly translates to better diagnostic performance.
Qualitatively, PathReasoner-R1 excels at distinguishing malignancies from benign "mimics." While other models might hallucinate features to justify an incorrect guess, PathReasoner-R1 uses a structured exclusion process, mirroring the clinical reasoning of a human pathologist. This robustness to scale suggests the model is learning general pathological principles rather than image-specific shortcuts.
Conclusion
PathReasoner-R1 represents a shift toward transparent, "deep thinking" AI in digital pathology. By grounding model reasoning in structured medical knowledge and optimizing for logical integrity, this framework provides a path toward more trustworthy and clinically useful diagnostic tools. Future work will focus on expanding knowledge graph coverage and integrating multi-modal data like genomics into the reasoning chain.
Summary updated