Agent SPI-WSI: In context learning for computationally spatial pathwayinferring on whole slide histopathology images conditioned on bulk RNAsequencing using pathologist in the loop.
Rajat VashisthaiD, Sandra BrosdaiD, Clemence J. BelleiD, Lauren G. AoudeiD, Nicola WaddelliD, Soumen GhoshiD, Caroline Louise CooperiD, Andrew P. BarbouriD, Viktor VeghiD
Abstract
Bulk RNA sequencing, while cost-effective compared to high-resolution spatial transcriptomics, averages gene expression across heterogeneous cell populations and thus lacks spatial context. To address this limitation, we introduce a structured, human-guided, multi-stage computational AI agent SPI-WSI, that iteratively generates, evaluates, and refines biologically informative natural-language prompts, thereby localizing bulk-derived pathway activity within histopathology slides. Our pipeline uses in-context prompting in large language models (LLMs) to adapt dynamically to the task of prompt generation. Candidate prompts are first produced by the LLM and then subjected to a secondary pathologist critiquing by the same LLM that cross-references PubMed to ensure both biological plausibility and specificity. Each approved prompt against their image tile is scored using the vision language foundation model (CONCH). We benchmarked different LLMs, Gemini 2.0, Gemini 2.5, Claude 3.7 and Claude 4.0, and found that Claude 4.0 achieves the highest cosine similarity (0.7) between image and prompt embeddings. Pathologist-driven scoring and manual segmentation confirm that our method accurately identifies clusters of spatial pathological morphologies. In addition, we have validated the method against ground-truth spatial transcriptomic spots using inhouse and public datasets. Overall, the trend emphasized by ground-truth spatial RNA sequencing prompts is closely aligned with those from bulk prompt. This pathologist-in-the-loop workflow enables large-scale, reproducible tissue profiling and grounds AI-driven spatial annotations.
02 /Specification & Classification
Click any tag to browse matching papers- Citations
- 0
- Organism
- Assay
- Research Focus
- Approach
Reproducibility ledger
Nobody has reported trying to reproduce this paper yet. Did you replicate an experiment or run the code? Your report saves the next lab a week.
Sign in to file a reproducibility report.
Related papers
- Molecularly informed analysis of histopathology images using natural language
Moritz Schaefer, Kalin Nonchev, … Christoph Bock·bioRxiv·Jul 14, 2025
- AnnotateAnyCell: Open-Source AI Framework for Efficient Annotation in Digital Pathology
Shourya Verma, Aditya Malusare, … Nadia A. Lanman·bioRxiv·Nov 2, 2025
- Histolytics: A Panoptic Spatial Analysis Framework for Interpretable Histopathology
Oskari Lehtonen, Niko K Nordlund, … Sampsa Hautaniemi·Computational and Structural Biotechnology JournalPeer-reviewed·Jan 1, 2025
- SpatialFinder: A Human-in-the-Loop Vision-Language Framework for Prioritizing High-Value Regions in Spatial Transcriptomics
Jonathan Xu, Michelle Jiang, … Zhi Huang·Frontiers in BioinformaticsPeer-reviewed·Apr 15, 2026
- WSInsight: a cloud-native, agent-callable platform for single-cell whole-slide pathology
Chao-Hui Huang, Oluwamayowa Awosika, Diane R. Fernandez·bioRxiv·May 17, 2026
- Query-driven generative AI synthesizes multi-modal spatial omics from histology
Minxing Pang, Tarun Kanti Roy, … Kai Tan·bioRxiv·Dec 13, 2025