PRET is a few-shot system for pan-cancer recognition without example training

Yi Li, Ziyu Ning, Tianqi Xiang, Qixiang Zhang, Zhihao Lin, Min Yi, Feiyan Feng, Baozhen Zeng, Xuexia Qian, Lu Sun, Jiace Qin, Ling Xiang, Chao Fan, Tian Qin, Qian Wang, Xiu-Wu Bian, Kun-Hsing Yu, Kang Zhang, Qingling Zhang, Xiaomeng LiarXiv 2026 · arXiv

TL;DR

PRET is a training-free, few-shot AI system that can recognize multiple types of cancer across different organs using only a handful of examples. By leveraging "in-context learning" on top of pathological foundation models, it achieves clinical-grade diagnostic accuracy—even outperforming human pathologists in some tasks—without requiring the massive, labeled datasets that typically bottleneck medical AI.

What Problem Does This Paper Address?

The "gold standard" for cancer diagnosis is pathological examination of tissue slides. However, there is a global shortage of pathologists, and conventional AI solutions are difficult to scale. Most current models are "task-specific," meaning you need thousands of meticulously labeled images to train a model just for one type of cancer (e.g., prostate cancer).

With nearly 900 known tumor types, training a separate model for each is practically impossible, especially for rare diseases or in underserved regions where data and AI expertise are scarce. The authors address this "data bottleneck" by creating a system that doesn't need to be "trained" in the traditional sense; it just needs to see a few examples of a new task to perform it.

Methods

The system is named PRET (pan-cancer recognition without examples training), inspired by the fashion term prêt-à-porter (ready-to-wear). Its core innovation is applying In-Context Learning (ICL)—a technique popularized by Large Language Models like GPT—to the world of gigapixel Whole-Slide Images (WSIs).

The PRET framework overview, showing how it handles multiple tasks and hospitals without retraining.

The architecture consists of several modular components:

  1. Feature Extractor: It uses existing "foundation models" (like UNI or Virchow) to turn image patches into numerical vectors.
  2. In-Context Tagger: This module processes "visual prompts" (like a slide label, a bounding box, or a rough outline) provided for the few example slides.
  3. Informative In-Context Classifier: Instead of fine-tuning weights, PRET performs a non-parametric similarity match. It compares patches from a "test" slide to the "tagged" patches from the example slides.
  4. Attention Aggregator: It uses a self-attention mechanism to weigh the most relevant patches and produce a final slide-level diagnosis.

Unlike previous training-free methods that "pool" an entire slide into one average vector (losing local detail), PRET preserves rich, patch-level information, which is critical for finding tiny tumors.

Datasets

The authors evaluated PRET on a massive scale: 23 international benchmarks involving 4,484 whole-slide images (~124 million patches) across 18 cancer types and 9 organs.

  • Public Datasets: TCGA (USA) and CAMELYON16/17 (Netherlands).
  • New Benchmarks: Data from the Guangdong Provincial People’s Hospital (GDPH) and the Qinghai Province Cancer Hospital (QPCH). The QPCH dataset is particularly notable as it represents an underserved, resource-constrained region in China.

Key Insights and Ideas

  • Local Info is King: The "aha moment" is that for pathology, global slide-level features are insufficient for few-shot learning. By keeping the comparison at the patch level, PRET can identify "discriminative instances" (the specific parts of a slide that look like cancer) much more effectively.
  • Flexible Visual Prompts: PRET isn't picky about how you label your examples. It can learn from high-effort pixel-level masks or "weak" prompts like simple bounding boxes or even just a binary "cancer/no cancer" label for the whole slide.
  • Foundation Model Synergy: PRET acts as a "plug-and-play" enhancer for pathological foundation models. As these underlying models get better at representing tissue, PRET’s performance improves automatically without any code changes.

Key Results

PRET outperformed existing training-free approaches in 20 out of 23 tasks.

  • Clinical-Grade Accuracy: In detecting lymph node metastasis (CAMELYON16), PRET achieved an Area Under the Curve (AUC) of 98.71% using only eight examples. This outperformed the average performance of 11 human pathologists (81.0% AUC).
  • Massive Gains: On some benchmarks, it improved upon the best existing baseline by as much as 36.76%.
  • Generalization: The model showed remarkable robustness across different races and hospitals. For instance, it maintained high accuracy when tested on slides from different countries or slides with "scan corruptions" (like blur or staining variations).
Comparison of PRET against pathologists and other few-shot methods on metastasis detection.

Limitations and Future Work

While powerful, the authors acknowledge a few hurdles:

  • Inference Speed: Because PRET retains local patch information for comparison, it takes longer to process a slide (about 7.4 seconds) compared to simpler models. However, this is still negligible compared to the time it takes to prepare a physical slide.
  • Randomness in Small Samples: With only 1–8 examples, the "quality" of those specific examples matters. If the examples are outliers, the performance can dip.
  • The "Full Data" Ceiling: In some complex subtyping tasks, conventional models trained on thousands of images can still beat PRET. PRET is designed for the "low-data" regime, not necessarily to replace "big data" models where they are available.

Future work includes integrating PRET with vision-language models to allow pathologists to interact with the system using natural language prompts.

Summary updated

Abstract

Pathological examination stands as the cornerstone in cancer diagnosis, impacting millions worldwide annually. With the shortage of pathologists globally, artificial intelligence (AI) has emerged rapidly to automate the diagnostics process. However, conventional AI models require substantial labeled data for each disease, posing huge challenges in scalability and practicality. Therefore, we introduce PRET (pan-cancer recognition without examples training), a few-shot system to achieve flexible, scalable, and effective cancer recognition across diverse organs, hospitals and tasks without training. Evaluated on 23 international benchmarks comprising 4,484 whole-slide images, our method outperforms existing approaches across 20 tasks, achieving over 97% area under the curve on 15 benchmarks with a maximum improvement of 36.76%. Notably, PRET delivers clinical-grade diagnostic performance in lymph node metastasis detection using only eight slide examples, outperforming 11 pathologists. By offering a flexible and cost-effective solution for pan-cancer recognition, PRET paves the way for accessible and equitable AI-based pathology systems, particularly benefiting minority populations and underserved regions.
BibTeX
@misc{li2026pret,
  author = {Yi Li and Ziyu Ning and Tianqi Xiang and Qixiang Zhang and Zhihao Lin and Min Yi and Feiyan Feng and Baozhen Zeng and Xuexia Qian and Lu Sun and Jiace Qin and Ling Xiang and Chao Fan and Tian Qin and Qian Wang and Xiu-Wu Bian and Kun-Hsing Yu and Kang Zhang and Qingling Zhang and Xiaomeng Li},
  title = {{PRET is a few-shot system for pan-cancer recognition without example training}},
  year = {2026},
  eprint = {2610.25054},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2610.25054},
}
Figure