TPMIL
TPMIL classifies whole slide images from patch features, using trainable prototypes to shape the feature space.
Medical imaging · 59 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
- 794.4K
- Operations
- 59
- Framework
- PyTorch
- Recurrent
- No
- Published
- MIDL 2023
- Paper
- TPMIL: Trainable Prototype Enhanced Multiple Instance Learning for Whole Slide Image Classification
- Cited by
- 6 (as of 30 October 2026)
- Authors
- Litao Yang, Deval Mehta, Sidong Liu and others
- Source
- GitHub: LitaoYang-Jet/TPMIL
- 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
- m20827
- Graph hash
- 2c4b49769653e6d74505d14af7e799d9b4239c90369cd21b811028385c367c81
- Skeleton hash
- 36e3117fa5045fa7fdeb290e1990edb254b5db15d4a40190afea347980d5a650
- Architecture hash
- c44f92e49adbcbfc244ab9ca3e3799b0f6aec76b55f62c293264d5ac64a4ee69
- Diagram SHA-256
- beedc4230262fb5e76f0520e53587baa7ad3099e9fd5b7c01d7f4af71ac037b8
- 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
TPMIL, short for Trainable Prototype enhanced deep MIL, is a framework for weakly supervised classification of whole slide images (WSIs) in digital pathology. Because slides are very high resolution and patch-level annotations are unavailable, the task is usually posed as a weakly supervised problem solved by multiple instance learning (MIL) over the patches of a slide.
The code is built on top of the CLAM framework, and its core addition is a prototype learning module. That module keeps K+1 trainable prototypes, one per tumor subtype plus one for normal tissue, and computes the Euclidean distance from every patch to each prototype. Each patch gets a soft pseudo-label that combines its attention score with the slide-level label, and a KL divergence loss matches the distance-based logits to those pseudo-labels. The point of the design is that all patches are softly clustered, where conventional methods refine the feature space with a certain number of selected patches.
The prototypes are not used to make the slide-level prediction; they refine the patch-level feature space. The paper evaluates TPMIL on two public datasets, a TCGA brain tumor dataset for multi-class classification and a TCGA lung cancer dataset for binary classification. For the brain tumor experiments, patches are first converted into 1024-dimensional vectors by a ResNet50 pre-trained on ImageNet.
Key idea. TPMIL adds trainable prototypes to attention-based multiple instance learning, softly clustering all patches of a slide to refine the patch-level feature space.
- TPMIL
- Trainable Prototype enhanced deep MIL
- multiple instance learning
- whole slide image classification
- WSI
- prototype learning
- digital pathology
- weakly supervised
- tumor subtyping
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{yang2023tpmiltrainableprototypeenhanced,
title={TPMIL: Trainable Prototype Enhanced Multiple Instance Learning for Whole Slide Image Classification},
author={Litao Yang and Deval Mehta and Sidong Liu and Dwarikanath Mahapatra and Antonio Di Ieva and Zongyuan Ge},
year={2023},
eprint={2305.00696},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2305.00696},
}