Slide-level histopathology encoder that contrastively aligns tile embeddings from several patch foundation models through a Mamba-2 aggregator.
No providers recorded yet. Browse all providers
A whole-slide image can reach 150,000 × 150,000 pixels, so computational pathology tessellates it into 224 × 224 tiles and embeds each one with a pretrained patch encoder. That leaves tens of thousands of vectors per slide and no principled way to pool them. The standard answer, multiple-instance learning, fits a fresh attention aggregator for every clinical endpoint, so the representation is only as general as the label it was trained against. Slide-level self-supervision would fix that, except the usual recipe needs two views of the same slide — and the image augmentations that generate views for natural photographs are precisely what patch foundation models are trained to ignore.
COBRA (COntrastive Biomarker Representation Alignment) moves the contrastive objective into feature space. Its two views of a patient are not two croppings of the pixels but two encodings: tiles sampled at a randomly chosen magnification and embedded by a randomly chosen patch encoder. CTransPath, UNI, Virchow2 and H-Optimus-0 disagree about which morphology matters, and COBRA is trained to emit the same patient vector no matter which of them supplied the tiles. Learning invariance to the encoder is what makes the result usable with encoders it has never seen.
COBRA comes from the Kather Lab at the Else Kröner Fresenius Center for Digital Health, TU Dresden, posted as a preprint in November 2024 and presented at CVPR 2025. Two checkpoints ship under the name: COBRA I, pretrained on five TCGA tissue types, and COBRA II, extended to all TCGA cohorts and now the default.
The slide encoder is 15M parameters in three stages: per-encoder embedding MLPs (layer norm, linear, SiLU, linear) that project 768-, 1024-, 1280- and 1536-dimensional tile embeddings into a shared space; two Mamba-2 state-space dual layers; and a multi-head gated attention module that collapses the sequence to one vector by weighted average. Training follows MoCo-v3 — an InfoNCE loss against an exponential-moving-average key encoder — on 3,048 WSIs from 2,848 patients across TCGA-BRCA (1,112 slides), CRC (566), LUAD (524), LUSC (496) and STAD (350), yielding 36,576 feature sets across four encoders and three magnifications. Pretraining took roughly 40 hours on four A100s at batch size 1,024 for 2,000 epochs.
Evaluation covers 15 tasks — mutation status, hormone-receptor expression, MSI, NSCLC subtyping, sidedness and nodal status — with MLP probes fit on frozen TCGA embeddings and deployed on 1,604 external CPTAC slides from 444 patients. COBRA averages 75.3% AUC, at least +4.4% over PRISM and +1.5% over mean Virchow2 patch embeddings, and exceeds other slide encoders by +15% and +24.2% on COAD MSI and BRAF. Applied to Prov-GigaPath tile embeddings, an encoder absent from pretraining, it improves +2.5% AUC over that encoder's mean baseline.
COBRA produces one frozen vector per slide or per patient, which a small MLP maps to a clinical endpoint — mutation calls, receptor expression, MSI status, subtype — with far less compute and labelled data than a MIL aggregator per task. Because the vectors are encoder-agnostic, a lab that has already embedded its archive with CONCH or Virchow2 can pool those features without recomputing them, and the attention heatmap shows a pathologist which regions drove the prediction. It is not an end-to-end image model: tiles and their embeddings must be produced upstream, typically with the same lab's STAMP pipeline.
COBRA's headline result is data efficiency — slide encoders such as PRISM and Prov-GigaPath were pretrained on hundreds of thousands of slides, TITAN and MADELEINE on multimodal pairs, and COBRA beats them from 3,048 public WSIs and a single modality. That matters most where slide archives are small or consent-restricted. It serves as a slide-encoder baseline in the Kather Lab's own EAGLE benchmark alongside TITAN and CHIEF. The limitations are practical: the code is GPL-3.0 but checkpoints sit behind a HuggingFace use agreement restricting them to non-commercial research, evaluation is retrospective on TCGA and CPTAC rather than prospective, and COBRA inherits the biases and stain sensitivities of the upstream patch encoders.
Much of this page is generated or calculated automatically. Flag anything that looks off and we will re-run it.