Histopathology patch encoder self-supervised with BYOL on 2.7M unlabeled H&E tiles, using attention that gates feature channels with pooled context.
No providers recorded yet. Browse all providers
Annotating histopathology is the bottleneck: a pathologist has to inspect gigapixel slides by eye, and the label budget runs out long before the pixels do. The usual workaround — start from ImageNet weights — imports a prior built on photographs of objects, where scale, orientation and colour statistics all mean something different than they do in an H&E field of view. The self-supervised alternatives at the time were trained on a few hundred whole-slide images, too little to hold up across cancer types and staining protocols.
TransPath attacks both halves. A tile cropped at 2,048 × 2,048 pixels contains two kinds of evidence at once: nuclear morphology, which is local, and tissue architecture, which is not. A convolutional stack resolves the first with a receptive field too small for the second; a plain vision transformer has the global view but discards the convolutional inductive bias that makes cell-level texture cheap to learn. TransPath runs both — a CNN produces a grid of local features, flattened into tokens and handed to a transformer encoder — and adds a token-aggregating and excitation (TAE) module behind the self-attention. TAE pools the attended tokens along the token axis into one value per feature channel, turns that into a channel-wise gate through a small bottleneck MLP, and rescales the attention output with it before the block's residual add, so each channel is re-weighted by how strongly it fires across the whole tile.
The model was built by Xiyue Wang and Minghui Wang of the College of Computer Science at
Sichuan University, Jing Zhang of the university's College of
Biomedical Engineering, and Sen Yang, Jun Zhang, Junzhou Huang, Wei Yang and Xiao Han at
Tencent AI Lab, and presented at MICCAI 2021. The same group's
successor, CTransPath, ships from the same repository under a confusingly
similar name; the two are separate checkpoints with different backbones and different objectives,
and the widely circulated ctranspath.pth file belongs to the successor, not to this model.
get_feature_transpath.py embeds arbitrary H&E tiles with the
released checkpoint, and a conversion script prepares the same weights for end-to-end
fine-tuning.The pretraining corpus is drawn from two public whole-slide collections, TCGA — 32,529 slides
spanning the pan-cancer archive — and PAIP. Roughly 100 patches were sampled at random per slide,
yielding 2,700,521 unlabeled crops. Pretraining ran on 32 NVIDIA V100 32 GB GPUs for about 3,200
GPU-hours, with a batch size of 256, a learning rate of 1e-4 and a cosine schedule; the released
code derives from the byol-pytorch and MoCo v2 implementations. Evaluation fine-tunes the
pretrained checkpoint on three public classification sets that contribute nothing to pretraining:
NCT-CRC-HE (colorectal tissue types), PatchCamelyon (lymph-node metastasis) and MHIST (colorectal
polyp subtyping). TransPath beats ViT, T2T-ViT-24 and the hybrid VT-ResNet and BoTNet-50 across
them, and beats both random and ImageNet initialization of its own backbone. The margin is
largest on MHIST, which is about a thirtieth the size of the other two — the annotation-scarce
regime the pretraining is meant for. The published numbers come from fine-tuning the checkpoint,
not from a frozen linear probe.
The checkpoint is a tile encoder for whole-slide workflows: embed the tiles of a slide once, then feed the embeddings to a multiple-instance-learning aggregator for slide-level calls, to a retrieval index, or to a small classifier trained on whatever labels a lab actually has. It is most useful where annotation is the binding constraint — a few hundred labeled regions, a rare subtype, a new stain — because the representation was learned without labels on a corpus far larger than any single study assembles.
TransPath is the earlier half of a pair that shaped how histopathology encoders were built: domain-specific self-supervision at million-tile scale, and a hybrid convolution-plus-attention backbone rather than a pure ViT. Both choices recur throughout the pathology foundation models that followed. Its own role is now historical — the authors' README states plainly that CTransPath is the preferred feature extractor, and downstream reuse consolidated there. Two practical caveats attach to the release: the weights are distributed through a Google Drive link with no version or checksum, and the repository carries a GPL-3.0 tag while its README restricts use to non-commercial academic purposes.
Much of this page is generated or calculated automatically. Flag anything that looks off and we will re-run it.