/ Модель

Характеристики

Лицензия
CC BY-NC-ND 4.0
Опубликована
5 ноя 2024

threads

Эмбеддинги изображенийИзображение → embedding3 профессии

THREADS извлекает эмбеддинги H&E-гистологических препаратов для построения моделей онкологической классификации, прогноза выживаемости и ответа на лечение.

205скачиваний за 30 дней0лайковвеса обновлены24 ноя 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

THREADS — разработанная Mahmood Lab AI for Pathology при Harvard/BWH модель для получения признакового представления гистологических препаратов в онкологии. Это энкодер целого H&E-стекла на основе многоголового внимания и multiple instance learning, содержащий 11,3 млн параметров. Он принимает эмбеддинги патчей CONCH v1.5 размером 768, полученные из участков 512 × 512 пикселей при увеличении 20×, и выдаёт один эмбеддинг с размерностью 1 024 на стекло или пациента.

Модель предварительно обучена контрастивным способом на наборе MBTG-47K: 47 171 H&E-препарат из 39 органов, сопоставленный с профилями bulk RNA-seq или целевого секвенирования ДНК. Она предназначена для извлечения признаков, которые можно использовать в линейных моделях для онкологических задач классификации, прогноза выживаемости и оценки ответа на лечение. В описанном бенчмарке замороженные эмбеддинги THREADS заняли первое место на 75 из 107 задач; особенно заметны результаты на небольших когортах ответа на терапию.

В репозитории выпущен только энкодер стекла: энкодеры RNA и DNA, применявшиеся при предварительном обучении, недоступны. Модель требует эмбеддингов патчей CONCH v1.5, а доступ к весам ограничен и предоставляется после одобрения запроса с институциональной электронной почтой. Лицензия CC-BY-NC-ND-4.0 разрешает использование на её условиях, включая ограничения на коммерческое применение и распространение производных материалов.

Сценарии применения

  • извлечение эмбеддинга из H&E-препарата целого стекла
  • классификация подтипов опухолей по гистологии
  • оценка степени злокачественности опухоли
  • характеристика опухолевого микроокружения
  • прогнозирование ответа опухоли на лечение
  • оценка выживаемости пациентов по гистологическому препарату

Ограничения

Для работы необходимы эмбеддинги патчей CONCH v1.5; сама модель не включает энкодеры RNA и DNA. Доступ к весам требует одобрения запроса, а лицензия CC-BY-NC-ND-4.0 ограничивает коммерческое использование и распространение производных материалов.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

Model Card for THREADS 🧵

A multimodal foundation model for molecular and morphologic data in oncology

Nature Cancer (2026)

[Journal article] | [GitHub repo] | [Benchmark (Patho-Bench)] | [Cite]

What is THREADS?

THREADS is a slide encoder for hematoxylin and eosin (H&E) whole-slide images (WSIs). It takes the CONCH v1.5 patch embeddings of a slide and returns one 1,024-dimensional slide embedding.

THREADS was pretrained on MBTG-47K: 47,171 H&E WSIs from 39 organs, collected at Mass General Hospital, Dana-Farber Cancer Institute/Brigham and Women's Hospital, GTEx and TCGA. Each slide is paired with the molecular profile of the same tissue: bulk RNA sequencing (26,615 slides) or DNA variants and copy-number changes from a targeted gene panel (20,556 slides). During pretraining, contrastive learning pulls each slide embedding towards the embedding of its own molecular profile. On 107 oncology tasks, a linear model on frozen THREADS embeddings, trained with a fixed cost and no tuning, ranked first on 75 tasks against PRISM, GigaPath and CHIEF, with the largest gains in small treatment-response cohorts (see Benchmark for how the evaluation was run).

Requesting Access

As mentioned in the gated prompt, you must agree to the outlined terms of use, with the primary email for your Hugging Face account matching your institutional email. If your primary email is a personal email (@gmail/@hotmail/@qq) your request will be denied. To fix this, you can: (1) add your official institutional email to your HF account, and confirm your email address to verify, and (2) set your institutional email as your primary email in your HF account. Other reasons for your request access being denied include other mistakes in the form submitted, for example: full name includes abbreviations, affiliation is not spelled out, the described research use is not sufficient, or email domain address not recognized.

Model Description

  • Developed by: Mahmood Lab AI for Pathology @ Harvard/BWH
  • Model type: Multi-head attention-based multiple instance learning (ABMIL) slide encoder, 11.3M parameters
  • Input: CONCH v1.5 patch embeddings (768 dimensions) of 512 × 512 px patches at 20× magnification
  • Output: one 1,024-dimensional embedding per slide (or per patient)
  • Pretraining dataset: MBTG-47K, 47,171 H&E WSIs paired with bulk RNA sequencing or targeted DNA sequencing, from MGH, DFCI/BWH, GTEx and TCGA
  • Repository: https://github.com/mahmoodlab/threadsmodel
  • Article: https://doi.org/10.1038/s43018-026-01252-w
  • License: CC-BY-NC-ND-4.0

Only the slide encoder is released. The RNA and DNA encoders used during pretraining are not part of this repository.

Requirements

pip install git+https://github.com/mahmoodlab/threadsmodel.git

This installs torch, einops and huggingface_hub. THREADS was developed with Python 3.10 and PyTorch 2.3, and runs on GPU or CPU.

Model Usage

Log in to Hugging Face with a User Access Token after your access request is approved:

huggingface-cli login

Extract CONCH v1.5 patch embeddings with TRIDENT (this also needs access to CONCH v1.5):

python run_batch_of_slides.py --task all --wsi_dir ./wsis --job_dir ./trident_processed --patch_encoder conch_v15 --mag 20 --patch_size 512

Then turn the patch embeddings of a slide into a slide embedding:

import h5py
import torch
from threadsmodel.inference import create_model_from_pretrained

# load model
model, precision, embedding_dim = create_model_from_pretrained(
    checkpoint_path="hf_hub:MahmoodLab/threads",
    cache_dir="./model_assets",
)
device = "cuda" if torch.cuda.is_available() else "cpu"
model.to(device)

# load CONCH v1.5 patch embeddings of one slide
with h5py.File("trident_processed/20x_512px_0px_overlap/features_conch_v15/SLIDE_ID.h5", "r") as f:
    patch_features = torch.from_numpy(f["features"][:]).unsqueeze(0)  # (1, num_patches, 768)

# extract slide embedding
with torch.inference_mode(), torch.autocast(device_type=device, dtype=precision):
    slide_embedding = model(patch_features.to(device))

print(slide_embedding.shape)  # torch.Size([1, 1024])

For a patient with several WSIs, concatenate the patch embeddings of all their slides along the patch dimension and pass them through the model once.

Benchmark

THREADS was evaluated on 107 tasks from 35 cohorts. Every number below comes from linear probing of frozen slide embeddings, with one recipe for all slide encoders and no hyperparameter search (the benchmark has no validation sets):

  • Classification: logistic regression (scikit-learn) with a fixed cost of C = 0.5, the L-BFGS solver, balanced class weights and up to 10,000 iterations.
  • Survival: CoxNet (scikit-survival) with a fixed α of 0.07 for overall survival and 0.01 for progression-free survival.
  • Cost ablation: to check that the ranking does not depend on the choice of C, the paper repeats the 97 classification tasks with C = 0.001, 0.01, 0.1, 0.5, 1 and 10 and with an adaptive cost. THREADS has the best average performance at every cost (Extended Data Fig. 2 and Supplementary Table 54 of the paper).

Each task uses its own metric (AUC, balanced accuracy, quadratic weighted kappa or concordance index), and family scores are the average over the tasks in that family. TITAN numbers were produced after the paper with the same tasks, splits and fixed-cost linear-probing recipe. They are not part of the published article, and TITAN is not part of the cost ablation.

Linear probe on frozen slide embeddings, fixed cost C = 0.5 (classification) and fixed CoxNet α (survival). Mean over the tasks in each row.

Task familyTasksTHREADSTITANPRISMGigaPathCHIEF
Patch encoderCONCH v1.5CONCH v1.5VirchowProv-GigaPathCTransPath
Full benchmark1070.7050.6730.6420.6290.649
Subtyping, grading and TME characterization370.6540.6130.5950.5860.613
Mutation prediction350.7620.7260.6920.6970.702
IHC status prediction150.8040.7880.7470.6960.733
Prognosis and treatment response200.6270.6030.5610.5390.561

The eight treatment response tasks in the benchmark. Linear probe on frozen slide embeddings, fixed cost C = 0.5 (classification) and fixed CoxNet α (survival). The best model on each task is in bold.

Treatment response taskCohortPatientsMetricTHREADSTITANPRISMGigaPathCHIEF
Bevacizumab response, ovarian cancerOV-Bevacizumab36AUC0.8630.5930.4300.5930.620
Temozolomide response, glioblastomaGBM-Response (in-house)93AUC0.7410.7070.6240.5980.575
Hormonal therapy response, prostate adenocarcinomaNADT-Prostate36AUC0.7320.6250.7220.5750.683
Residual cancer burden after neoadjuvant therapy, breast cancerBC Therapy159Balanced accuracy0.3500.3320.2700.2670.321
Trastuzumab response, HER2-positive breast cancerHER2-Tumor-ROIs85AUC0.6350.6570.5100.6300.685
Chemotherapy response (RECIST), metastatic breast cancerMBC76Weighted kappa0.2520.2870.2060.0100.230
Overall survival after chemotherapy, metastatic breast cancerMBC75C-index0.5500.6000.5080.4350.460
Progression-free survival, high-grade serous ovarian cancerBOEHMK183C-index0.5410.5420.5030.5360.521

Labels and splits for the 95 tasks built on public cohorts are available through Patho-Bench. The other 12 tasks use in-house cohorts that are not public.

License and Terms of Use

This model and associated code are released under the CC-BY-NC-ND 4.0 license and may only be used for non-commercial, academic research purposes with proper attribution. Any commercial use, sale, or other monetization of the THREADS model and its derivatives, which include models trained on outputs from the THREADS model or datasets created from the THREADS model, is prohibited and requires prior approval. Downloading the model requires prior registration on Hugging Face and agreeing to the terms of use. By downloading this model, you agree not to distribute, publish or reproduce a copy of the model. If another user within your organization wishes to use the THREADS model, they must register as an individual user and agree to comply with the terms of use. Users may not attempt to re-identify the deidentified data used to develop the underlying model. If you are a commercial entity, please contact the corresponding author or Mass General Brigham Innovation Office.

Contact

For any additional questions or comments, contact Faisal Mahmood (faisalmahmood@bwh.harvard.edu),
Anurag Vaidya (avaidya@mit.edu),
Andrew Zhang (andrewzh@mit.edu),
or Guillaume Jaume (gjaume@bwh.harvard.edu).

Acknowledgements

THREADS was built on OpenCLIP (contrastive pretraining) and scGPT (RNA encoder). Patch embeddings come from CONCH v1.5, and slides were processed with TRIDENT. We thank the authors and developers for their contributions.

BibTeX

If you find our work useful in your research, please cite our paper:

Vaidya, A.*, Zhang, A.*, Jaume, G.* et al. A multimodal foundation model for molecular and morphologic data in oncology. Nature Cancer (2026). https://doi.org/10.1038/s43018-026-01252-w

@article{vaidya2026multimodal,
  title={A multimodal foundation model for molecular and morphologic data in oncology},
  author={Vaidya, Anurag and Zhang, Andrew and Jaume, Guillaume and Song, Andrew H and Ding, Tong and Wagner, Sophia J and Lu, Ming Y and Robertson, Harry and Williamson, Drew F K and Doucet, Paul and Almagro-P{\'e}rez, Cristina and Chen, Richard J and ElHarouni, Dina and Ayoub, Georges and Bossi, Connor and Ligon, Keith L and Patrick, Ellis and Beltran, Himisha and MacConaill, Laura and Lindeman, Neal and Sholl, Lynette and Gerber, Georg K and Le, Long Phi and Mahmood, Faisal},
  journal={Nature Cancer},
  year={2026},
  doi={10.1038/s43018-026-01252-w}
}

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм

Нельзя запустить

Не удалось определить, чем загружать веса модели (нет library_name и architectures).

Ревизия весов
9351fce

0 моделей