/ Модель

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

Лицензия
CC BY-NC-ND 4.0
Базовая модель
conchv1_5
Библиотека
transformers
Опубликована
12 окт 2026

CONCH-Z

Классификация изображений без дообученияИзображение, текст → label3 профессии

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

4 798скачиваний за 30 дней26лайковвеса обновлены14 окт 2026

Бенчмарки

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

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

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

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

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

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

CONCH-Z — модель «изображение–текст» для гистопатологии, разработанная Mahmood Lab AI for Pathology при Harvard/BWH. Она дополняет визуальный энкодер CONCH v1.5 ViT-L/16, оставленный без изменений и замороженный, текстовым энкодером CoCa из 12 слоёв, обученным методом LIMIT. Всего в модели 418 млн параметров; визуальные и текстовые представления проецируются в общее пространство размерности 768.

Модель предназначена для академических исследований H&E-препаратов: классификации патчей без обучения отдельного классификатора, сравнения изображений с текстовыми описаниями классов и извлечения эмбеддингов для последующих моделей. Можно использовать уже рассчитанные признаки CONCH v1.5, предварительно проецировав их в общее пространство. Результаты зависят от формулировки текстовых запросов; указание типа ткани или органа и использование синонимов могут улучшить точность. Модель не создаёт подписи к изображениям: декодер для генерации текста не включён.

Модель рассчитана на некоммерческие академические исследования и не предназначена для клинической диагностики или принятия медицинских решений. Доступ к весам ограничен и требует запроса; лицензия CC BY-NC-ND 4.0 запрещает коммерческое использование и распространение производных материалов на её условиях.

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

  • классификация патчей гистологических изображений по текстовым меткам
  • оценка соответствия патча описанию типа ткани или патологии
  • сравнение гистологических изображений с названиями классов
  • извлечение эмбеддингов изображений и текстовых запросов для исследовательских моделей

Ограничения

Модель предназначена только для некоммерческих академических исследований и не должна использоваться для клинической диагностики или принятия медицинских решений. Точность зависит от формулировки классов, а генерация подписей к изображениям не поддерживается.

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

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

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

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

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

Открыть на Hugging Face

CONCH-Z

The text encoder for CONCH v1.5

arXiv NeurIPS 2026 Spotlight GitHub Mahmood Lab

Beyond Sparse Captions: Aligning Slide-Level Text and Patch-Level Vision in Pathology
NeurIPS 2026 · Spotlight

Daniel Shao*, Dongmin Bang*, Luca L. Weishaupt, Sophia J. Wagner, Nic G. Reitsam,
Ming Y. Lu, Long P. Le, Richard J. Chen†, Faisal Mahmood†

*Co-first authors · †Co-senior authors

Paper · Code · Quickstart · Results · Citation


CONCH-Z brings text encoding and zero-shot classification to CONCH v1.5. The previous CONCH v1.5 release provided only the vision encoder. CONCH-Z pairs that same vision encoder, unchanged, with an aligned text tower, so you can compare pathology image patches with natural-language class descriptions without training a task-specific classifier.

  • CONCH-Z can directly replace CONCH v1.5. The vision encoder is identical, so you don't need to re-extract patch features you already have from CONCH v1.5 (e.g. via Trident or TITAN's return_conch()).
  • CONCH-Z adds a text tower and the CONCH v1.5 image projection layer (proj_contrast), which the public CONCH v1.5 release leaves out. Projected image features and text embeddings share one space, which enables zero-shot classification.

Note: This release focuses on using CONCH-Z. Code for LIMIT training is coming soon in the GitHub repository.

Model details

Developed byMahmood Lab AI for Pathology @ Harvard/BWH
Model typeVision-language model: CONCH v1.5 vision encoder (ViT-L/16, frozen) with a LIMIT-trained CoCa text encoder (12-layer transformer), sharing a 768-d embedding space
Parameters418M in total: vision encoder 307M (unchanged from CONCH v1.5), image projection 0.6M, text encoder 110M
InputRGB H&E patches resized to 448 × 448 (model.eval_transform), or precomputed CONCH v1.5 patch features; text prompts of up to 127 tokens
TrainingLIMIT, on approximately 335,000 clinical pathology reports. The image tower and projection are frozen; only the text tower is trained.
Base modelMahmoodLab/conchv1_5
PaperBeyond Sparse Captions: Aligning Slide-Level Text and Patch-Level Vision in Pathology, NeurIPS 2026 (Spotlight)
Repositorygithub.com/mahmoodlab/LIMIT
LicenseCC-BY-NC-ND 4.0

From clinical reports to zero-shot predictions

CONCH-Z is trained with LIMIT (Locked Image Multiple Instance PreTraining), which aligns the text encoder to a frozen visual space using approximately 335,000 clinical pathology reports. The image tower stays frozen and only the text tower is trained. At inference, candidate class descriptions become text queries for zero-shot classification.

Requesting access

Access requires agreeing to the terms of use in the form on this page, with the primary email of your Hugging Face account matching your institutional email. Requests from accounts whose primary email is personal (@gmail/@hotmail/@qq) are denied. To fix this, (1) add your official institutional email to your Hugging Face account and verify it, and (2) set it as your primary email. Other common reasons for denial are mistakes in the form, for example a full name with abbreviations, an affiliation that is not spelled out, an insufficient description of the research use, or an unrecognized email domain.

Installation & access

The model is gated. Request access with the form on this page (see Requesting access), then log in:

pip install torch torchvision timm transformers huggingface_hub
huggingface-cli login

Loading the model

import torch
from transformers import AutoModel

model = AutoModel.from_pretrained("MahmoodLab/CONCH-Z", trust_remote_code=True)
model = model.eval().to("cuda")

The model has three parts:

ComponentRole
Vision encoderSame as CONCH v1.5 (ViT-L/16 + attentional pooler). Maps a patch to the 768-d feature that the public CONCH v1.5 release and Trident's conch_v15 encoder output.
Image projection (visual.proj_contrast)A 768 × 768 linear map from CONCH v1.5 features into the shared image-text space. It is CONCH v1.5's own contrastive head, kept frozen during LIMIT, but it is not part of the public CONCH v1.5 weights.
Text encoderNew in CONCH-Z. Maps a prompt to a 768-d embedding in the shared space.

Important: Image features must pass through the projection before you compare them with text. encode_image does this for you. For CONCH v1.5 features computed elsewhere, call model.project_image_features first. If you skip it, zero-shot accuracy falls below chance: SPIDER-C balanced accuracy drops from 58.8 to 10.3.

Encoding images

from PIL import Image

image = Image.open("patch.png").convert("RGB")
image = model.eval_transform(image).unsqueeze(0).to("cuda")   # (1, 3, 448, 448)

with torch.inference_mode():
    image_emb = model.encode_image(image)                      # (1, 768), projected and L2-normalized

encode_image runs the vision encoder and then the projection. To get the unprojected CONCH v1.5 feature (identical to Trident's conch_v15 output), use model.encode_image_features(image).

Using precomputed CONCH v1.5 features

If you already have CONCH v1.5 patch features (for example .h5 files from Trident's conch_v15 encoder), you don't need to re-extract them. Project them into the shared space:

import h5py

with h5py.File("slide.h5", "r") as f:
    features = torch.from_numpy(f["features"][:])              # (N, 768) CONCH v1.5 features

with torch.inference_mode():
    image_emb = model.project_image_features(features)         # (N, 768), features @ proj_contrast, L2-normalized

Encoding text

prompts = [
    "a lymph node biopsy containing metastatic breast carcinoma",
    "a lymph node biopsy containing normal lymphoid tissue",
]

with torch.inference_mode():
    input_ids = model.tokenizer(prompts).to("cuda")               # (C, 128)
    text_emb = model.encode_text(input_ids, normalize=True)      # (C, 768)

Tip: as in the paper, prepend the tissue or organ type to each class name (e.g. "breast tissue, invasive ductal carcinoma"). This usually helps zero-shot accuracy.

Zero-shot classification

Option 1: built-in helper

zero_shot_classifier builds one L2-normalized embedding per class. It averages over any number of synonyms per class and prompt templates (CLASSNAME is replaced by each synonym). zero_shot takes projected image embeddings (from encode_image or project_image_features) and returns softmax probabilities scaled by the model's learned temperature:

classnames = [
    ["metastatic breast carcinoma", "tumor"],     # class 0 synonyms
    ["normal lymph node", "lymphocytes"],         # class 1 synonyms
]
templates = ["CLASSNAME", "an image of CLASSNAME", "lymph node, CLASSNAME"]

with torch.inference_mode():
    classifier = model.zero_shot_classifier(classnames, templates, device="cuda")  # (768, num_classes)
    probs = model.zero_shot(image_emb, classifier)                                 # (N, num_classes)

pred = probs.argmax(dim=-1)

Option 2: project, L2-normalize and multiply

Zero-shot classification is cosine similarity between projected image embeddings and text embeddings. You can compute it directly, which is handy when you already have a large set of precomputed CONCH v1.5 patch features:

import torch.nn.functional as F

proj = model.visual.proj_contrast                           # (768, 768) image projection

image_emb = F.normalize(features.cuda() @ proj, dim=-1)     # (N, 768)  projected patch embeddings
text_emb  = F.normalize(text_emb, dim=-1)                   # (C, 768)  one embedding per class

similarity = image_emb @ text_emb.T                         # (N, C) cosine similarities
pred = similarity.argmax(dim=-1)                            # predicted class per patch

Results: zero-shot patch-level classification

C16 is reported as AUC. SPIDER and CATCH are reported as balanced accuracy, averaged across organs and tasks. The number of classes is in parentheses. Best result in bold. See the paper for per-organ results and bootstrap standard deviations.

BenchmarkPLIPQuiltNetMUSKMI-ZeroCONCH v1.5CONCH-Z
CAMELYON-16, lymph node (2)88.491.782.759.990.396.7
SPIDER-C, coarse (7–9 per organ)34.830.151.344.249.758.8
SPIDER-F, fine-grained (13–24 per organ)25.619.744.134.942.951.3
CATCH, canine skin (2 / 11)49.348.359.151.347.964.4

Intended use and limitations

  • Intended use: non-commercial academic research on H&E histopathology, such as zero-shot patch classification, scoring patches against text queries, and extracting image and text embeddings for downstream models.
  • Out of scope: clinical diagnosis or any other clinical decision-making, and commercial use.
  • Prompt sensitivity: zero-shot accuracy depends on how classes are worded. Prepending the organ or tissue type, and averaging several synonyms or templates per class with zero_shot_classifier, usually helps.
  • No captioning: CONCH-Z ships the contrastive image and text encoders only. The CoCa caption decoder is not included.

License

The model weights are released under CC-BY-NC-ND 4.0 for non-commercial academic research only. The model is not validated for clinical diagnosis.

Citation

If you use CONCH-Z or LIMIT in your research, please cite:

@inproceedings{shao2026limit,
  title     = {Beyond Sparse Captions: Aligning Slide-Level Text and Patch-Level Vision in Pathology},
  author    = {Shao, Daniel and Bang, Dongmin and Weishaupt, Luca L. and Wagner, Sophia J. and Reitsam, Nic G. and Lu, Ming Y. and Le, Long P. and Chen, Richard J. and Mahmood, Faisal},
  booktitle = {Advances in Neural Information Processing Systems},
  year      = {2026},
  url       = {https://github.com/mahmoodlab/LIMIT}
}

Questions

Please open a GitHub issue for questions about using CONCH-Z.

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

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

GPU в ailist

Универсальный рантайм · transformers · zero-shot-image-classification

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

Доступ к модели ограничен автором; у платформы нет доступа к весам.

Ревизия весов
60211fc

0 моделей