PTCMIL
ViT-based multiple instance learning for whole slide images that clusters patches with prompt tokens.
Medical imaging · 786 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
At a glance
- Task
- Medical imaging
- Parameters
- 1.6M
- Operations
- 786
- Framework
- PyTorch
- Recurrent
- Yes
- Published
- MICCAI 2025
- Cited by
- 1 (as of 28 October 2026)
- Authors
- Beidi Zhao, SangMook Kim, Hao Chen and others
- Source
- GitHub: ubc-tea/PTCMIL
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m19203
- Graph hash
- 9319446a9395319b571e1811ba7afec10c60a6b0377b82ec2309c274b46a967c
- Skeleton hash
- f887562d45afe0b7073a03720e43cf6cd16308508b71ea78830e03d7f765f06b
- Architecture hash
- 2c39471c4b183f0bea595db34407e755f198f45d3ecf1d9abed76f1e703efde1
- Diagram SHA-256
- 25906a3b4ce7d8fae1684224067978137c681ac4cd65bb61f9a3a987abb27742
- TorchLens version
- 2.36.0
- Renderer
- graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
- Check
- Forward pass replayed in PyTorch
What it is
PTCMIL is a multiple instance learning model for whole slide images, the giga-pixel pathology images that are analyzed with slide-level annotation and no patch-level labels. The paper notes that in earlier two-stage methods the standalone clustering of patches is not optimized for the downstream task. PTCMIL instead introduces learnable prompt tokens into a ViT backbone so that clustering and prediction are unified in an end-to-end manner.
The architecture has three parts: clustering based on learnable prompt tokens, prototype merging over the clusters, and pooling over the prototypes to get the slide representation for the downstream task. Each prompt token stands for one cluster, and patches are clustered by projecting the patch tokens onto the prompt tokens. The authors explain that clustering tokens by pairwise similarity becomes impractical for slides, where the number of image tokens can exceed ten thousand. A regularization loss prevents the prompts from collapsing across clusters during training, and a moving average is used to update the prompts.
The paper evaluates classification on Camelyon16, TCGA-NSCLC, PANDA and an in-house prostate dataset, and evaluates survival prediction as well. In those experiments the numbers of clusters for Camelyon16, TCGA and PANDA are 7, 5 and 5.
Key idea. PTCMIL introduces learnable prompt tokens into a ViT so that patch clustering, prototype merging and slide-level prediction are learned together end to end.
- PTCMIL
- Prompt Token Clustering MIL
- multiple instance learning
- whole slide image
- WSI classification
- computational pathology
- survival prediction
- prompt token clustering
- histopathology
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{zhao2025ptcmilmultipleinstancelearning,
title={PTCMIL: Multiple Instance Learning via Prompt Token Clustering for Whole Slide Image Analysis},
author={Beidi Zhao and SangMook Kim and Hao Chen and Chen Zhou and Zu-hua Gao and Gang Wang and Xiaoxiao Li},
year={2025},
eprint={2507.18848},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2507.18848},
}