ALPaCA: Adapting Llama for Pathology Context Analysis to enable slide-level question answering

Abstract Large Vision Language Models (LVLMs) are increasingly used in computational pathology for image classification, description generation, question answering and interactive diagnostics. However, most pathology LVLMs analyse small regions of interest rather than pyramidal, gigapixel-scale whole-slide images (WSIs), limiting their use for tasks requiring whole-slide assessment across sub-regions and magnification levels. Here, we present ALPaCA (Adapting Llama for Pathology Context Analysis), a slide-level LVLM framework for WSI question answering across diverse cancer types and tissue sites. ALPaCA is trained using 35,913 WSIs with curated descriptions and 341,051 question-answer pairs from TCGA and GTEx. It combines a LongFormer vision-text adaptor with a Gaussian mixture model-based prototyping adaptor and Llama3.1. ALPaCA exceeds 90% accuracy on internal close-ended benchmarks and maintains 77–82% accuracy on independent external cohorts. Expert pathologist evaluation of open-ended responses supports its slide-level reasoning capability. Additionally, ALPaCA can be fine-tuned on organ- or disease-specific datasets, supporting specialised pathology question answering.

Authors

Institutions

Publication Details

Journal
Nature Communications
Published
2026-08-20
DOI
https://doi.org/10.1038/s41467-026-76372-z
Citations
3
Primary Topic
Topic Modeling
Type
article
Field-Weighted Citation Impact
14.20

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

ALPaCA: Adapting Llama for Pathology Context Analysis to enable slide-level question answering

Mercedes Jimenez‐Liñan, Mireia Crispin‐Ortuzar, Brian Rous, Shangqi Gao et al.
3 citations
Nature Communications
Topic Modeling
14.20
article

ALPaCA: Adapting Llama for Pathology Context Analysis to enable slide-level question answering

Mercedes Jimenez‐Liñan, Mireia Crispin‐Ortuzar, Brian Rous, Shangqi Gao, Mengling Feng, Tieliang Gong, Zeyu Gao, Chunbao Wang, Chengzu Li, Faisal Mahmood, William McGough, Weiheng Su, Di Zhang, Chen Li, Kai He, Inês Machado, Xiaobo Pang
article en
3 citations

Abstract

Abstract Large Vision Language Models (LVLMs) are increasingly used in computational pathology for image classification, description generation, question answering and interactive diagnostics. However, most pathology LVLMs analyse small regions of interest rather than pyramidal, gigapixel-scale whole-slide images (WSIs), limiting their use for tasks requiring whole-slide assessment across sub-regions and magnification levels. Here, we present ALPaCA (Adapting Llama for Pathology Context Analysis), a slide-level LVLM framework for WSI question answering across diverse cancer types and tissue sites. ALPaCA is trained using 35,913 WSIs with curated descriptions and 341,051 question-answer pairs from TCGA and GTEx. It combines a LongFormer vision-text adaptor with a Gaussian mixture model-based prototyping adaptor and Llama3.1. ALPaCA exceeds 90% accuracy on internal close-ended benchmarks and maintains 77–82% accuracy on independent external cohorts. Expert pathologist evaluation of open-ended responses supports its slide-level reasoning capability. Additionally, ALPaCA can be fine-tuned on organ- or disease-specific datasets, supporting specialised pathology question answering.

Nature Communications
Harvard University (US), National University of Singapore (SG), University of Cambridge (GB), Cambridge University Hospitals NHS Foundation Trust (GB), First Affiliated Hospital of Xi'an Jiaotong University (CN), National University Health System (SG), Xi'an Jiaotong University (CN)
UK Research and Innovation, Cancer Research UK, National Institute for Health and Care Research, Department of Health and Social Care, University of Warwick, University of Birmingham, National University of Singapore, Engineering and Physical Sciences Research Council, NIHR Cambridge Biomedical Research Centre
Openalex Percentile: Top 2%
Topic Modeling
14.20
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.