Pathology-CoT: Learning Visual Chain-of-Thought Agent from Expert Whole Slide Image Diagnosis Behavior
Sheng Wang, Ruiming Wu, Charles Herndon, Yihang Liu, Shunsuke Koga, Jeanne Shen, Zhi Huang
TL;DR
This work tackles the data bottleneck in creating agentive, explainable pathology AI by recording expert WSI viewing behavior and converting it into structured supervision to train Pathology-o3, a two-stage agent that first proposes diagnostically relevant ROIs and then reasons over them with a vision-language model. The AI Session Recorder converts raw viewing logs into discrete actions and ROI rationales, yielding the Pathology-CoT dataset (5,222 rounds from 8 pathologists across 921 sessions). Pathology-o3, powered by a library of task-specific Behavior Predictors and a central Reasoning Module, achieves state-of-the-art performance on CRC lymph node metastasis with perfect or near-perfect recall internally and strong generalization to an external LNCO2 cohort (Sweden), outperforming OpenAI o3 and other baselines. This data-centric, modular approach demonstrates a scalable path toward human-aligned, upgradeable clinical AI in pathology, with open-source data and code to enable future expansion and deployment.
Abstract
Diagnosing a whole-slide image is an interactive, multi-stage process of changing magnification and moving between fields. Although recent pathology foundation models demonstrated superior performances, practical agentic systems that decide what field to examine next, adjust magnification, and deliver explainable diagnoses are still lacking. Such limitation is largely bottlenecked by data: scalable, clinically aligned supervision of expert viewing behavior that is tacit and experience-based, not documented in textbooks or internet, and therefore absent from LLM training. Here we introduce a framework designed to address this challenge through three key breakthroughs. First, the AI Session Recorder seamlessly integrates with standard whole-slide image viewers to unobtrusively record routine navigation and convert the viewer logs into standardized behavioral commands and bounding boxes. Second, a lightweight human-in-the-loop review turns AI-drafted rationales for behavioral commands into the Pathology-CoT dataset, a form of paired "where to look" and "why it matters", enabling six-fold faster labeling compared to manual constructing such Chain-of-Thought dataset. Using this behavioral data, we build Pathology-o3, a two-stage agent that first proposes important ROIs and then performs behavior-guided reasoning. On the gastrointestinal lymph-node metastasis detection task, our method achieved 100 recall on the internal validation from Stanford Medicine and 97.6 recall on an independent external validation from Sweden, exceeding the state-of-the-art OpenAI o3 model and generalizing across backbones. To our knowledge, Pathology-CoT constitutes one of the first behavior-grounded agentic systems in pathology. Turning everyday viewer logs into scalable, expert-validated supervision, our framework makes agentic pathology practical and establishes a path to human-aligned, upgradeable clinical AI.
