/ Модель

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

Контекст
512 токенов
Параметры
137 млн
Лицензия
MIT
Архитектура
cxr-bert · dense
Опубликована
11 мая 2022

BiomedVLP-CXR-BERT-specialized

Заполнение пропусковТекст → текст3 профессии

Англоязычная BERT-модель Microsoft для предсказания токенов и создания текстовых представлений в исследованиях по радиологии грудной клетки и визуально-языковому обучению.

112 тыс.скачиваний за 30 дней42лайкавеса обновлены25 июл 2025

Бенчмарки

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

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

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

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

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

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

CXR-BERT-specialized — англоязычная языковая модель Microsoft для текстов о рентгенографии грудной клетки. Она основана на BERT и содержит 136,7 млн параметров; модель обучена предсказывать замаскированные токены и формировать текстовые представления, согласованные с представлениями рентгеновских изображений. В README описано её дальнейшее предобучение на текстах PubMed, MIMIC-III и MIMIC-CXR, а также совместное контрастивное обучение с ResNet-50 в рамках BioViL. Контекст модели — до 512 токенов.

Модель предназначена для исследований в клинической обработке языка и визуально-языковых задачах радиологии: предсказания пропущенных токенов, сравнения текстовых и визуальных представлений, классификации изображений и локализации фраз на снимках. В README отмечены результаты на задачах вывода по радиологическим текстам и masked language modeling. Для работы с изображениями требуется соответствующая модель изображения; сама карточка CXR-BERT-specialized представляет текстовую модель.

Модель обучена на английских биомедицинских публикациях и клинических текстах и рассчитана на английский язык. Она предназначена для исследований и воспроизведения экспериментов; любое практическое внедрение, коммерческое или иное, указано как выходящее за рамки предполагаемого использования. Лицензия — MIT.

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

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

Ограничения

Модель рассчитана только на английский язык. По README, любое внедрение в практические сценарии, включая коммерческое, выходит за рамки предполагаемого использования; задачи с изображениями требуют отдельной модели изображения.

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

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

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

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

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

Открыть на Hugging Face

CXR-BERT-specialized

CXR-BERT is a chest X-ray (CXR) domain-specific language model that makes use of an improved vocabulary, novel pretraining procedure, weight regularization, and text augmentations. The resulting model demonstrates improved performance on radiology natural language inference, radiology masked language model token prediction, and downstream vision-language processing tasks such as zero-shot phrase grounding and image classification.

First, we pretrain CXR-BERT-general from a randomly initialized BERT model via Masked Language Modeling (MLM) on abstracts PubMed and clinical notes from the publicly-available MIMIC-III and MIMIC-CXR. In that regard, the general model is expected be applicable for research in clinical domains other than the chest radiology through domain specific fine-tuning.

CXR-BERT-specialized is continually pretrained from CXR-BERT-general to further specialize in the chest X-ray domain. At the final stage, CXR-BERT is trained in a multi-modal contrastive learning framework, similar to the CLIP framework. The latent representation of [CLS] token is utilized to align text/image embeddings.

Model variations

ModelModel identifier on HuggingFaceVocabularyNote
CXR-BERT-generalmicrosoft/BiomedVLP-CXR-BERT-generalPubMed & MIMICPretrained for biomedical literature and clinical domains
CXR-BERT-specialized (after multi-modal training)microsoft/BiomedVLP-CXR-BERT-specializedPubMed & MIMICPretrained for chest X-ray domain

Image model

CXR-BERT-specialized is jointly trained with a ResNet-50 image model in a multi-modal contrastive learning framework. Prior to multi-modal learning, the image model is pre-trained on the same set of images in MIMIC-CXR using SimCLR. The corresponding model definition and its loading functions can be accessed through our HI-ML-Multimodal GitHub repository. The joint image and text model, namely BioViL, can be used in phrase grounding applications as shown in this python notebook example. Additionally, please check the MS-CXR benchmark for a more systematic evaluation of joint image and text models in phrase grounding tasks.

Citation

The corresponding manuscript is accepted to be presented at the European Conference on Computer Vision (ECCV) 2022

@misc{https://doi.org/10.48550/arxiv.2204.09817,
  doi = {10.48550/ARXIV.2204.09817},
  url = {https://arxiv.org/abs/2204.09817},
  author = {Boecking, Benedikt and Usuyama, Naoto and Bannur, Shruthi and Castro, Daniel C. and Schwaighofer, Anton and Hyland, Stephanie and Wetscherek, Maria and Naumann, Tristan and Nori, Aditya and Alvarez-Valle, Javier and Poon, Hoifung and Oktay, Ozan},
  title = {Making the Most of Text Semantics to Improve Biomedical Vision-Language Processing},
  publisher = {arXiv},
  year = {2022},
}

Model Use

Intended Use

This model is intended to be used solely for (I) future research on visual-language processing and (II) reproducibility of the experimental results reported in the reference paper.

Primary Intended Use

The primary intended use is to support AI researchers building on top of this work. CXR-BERT and its associated models should be helpful for exploring various clinical NLP & VLP research questions, especially in the radiology domain.

Out-of-Scope Use

Any deployed use case of the model --- commercial or otherwise --- is currently out of scope. Although we evaluated the models using a broad set of publicly-available research benchmarks, the models and evaluations are not intended for deployed use cases. Please refer to the associated paper for more details.

How to use

Here is how to use this model to extract radiological sentence embeddings and obtain their cosine similarity in the joint space (image and text):

import torch
from transformers import AutoModel, AutoTokenizer

# Load the model and tokenizer
url = "microsoft/BiomedVLP-CXR-BERT-specialized"
tokenizer = AutoTokenizer.from_pretrained(url, trust_remote_code=True)
model = AutoModel.from_pretrained(url, trust_remote_code=True)

# Input text prompts (e.g., reference, synonym, contradiction)
text_prompts = ["There is no pneumothorax or pleural effusion",
                "No pleural effusion or pneumothorax is seen",
                "The extent of the pleural effusion is constant."]

# Tokenize and compute the sentence embeddings
tokenizer_output = tokenizer.batch_encode_plus(batch_text_or_text_pairs=text_prompts,
                                               add_special_tokens=True,
                                               padding='longest',
                                               return_tensors='pt')
embeddings = model.get_projected_text_embeddings(input_ids=tokenizer_output.input_ids,
                                                 attention_mask=tokenizer_output.attention_mask)

# Compute the cosine similarity of sentence embeddings obtained from input text prompts.
sim = torch.mm(embeddings, embeddings.t())

Data

This model builds upon existing publicly-available datasets:

These datasets reflect a broad variety of sources ranging from biomedical abstracts to intensive care unit notes to chest X-ray radiology notes. The radiology notes are accompanied with their associated chest x-ray DICOM images in MIMIC-CXR dataset.

Performance

We demonstrate that this language model achieves state-of-the-art results in radiology natural language inference through its improved vocabulary and novel language pretraining objective leveraging semantics and discourse characteristics in radiology reports.

A highlight of comparison to other common models, including ClinicalBERT and PubMedBERT:

RadNLI accuracy (MedNLI transfer)Mask prediction accuracyAvg. # tokens after tokenizationVocabulary size
RadNLI baseline53.30---
ClinicalBERT47.6739.8478.98 (+38.15%)28,996
PubMedBERT57.7135.2463.55 (+11.16%)28,895
CXR-BERT (after Phase-III)60.4677.7258.07 (+1.59%)30,522
CXR-BERT (after Phase-III + Joint Training)65.2181.5858.07 (+1.59%)30,522

CXR-BERT also contributes to better vision-language representation learning through its improved text encoding capability. Below is the zero-shot phrase grounding performance on the MS-CXR dataset, which evaluates the quality of image-text latent representations.

Vision–Language Pretraining MethodText EncoderMS-CXR Phrase Grounding (Avg. CNR Score)
BaselineClinicalBERT0.769
BaselinePubMedBERT0.773
ConVIRTClinicalBERT0.818
GLoRIAClinicalBERT0.930
BioViLCXR-BERT1.027
BioViL-LCXR-BERT1.142

Additional details about performance can be found in the corresponding paper, Making the Most of Text Semantics to Improve Biomedical Vision-Language Processing.

Limitations

This model was developed using English corpora, and thus can be considered English-only.

Further information

Please refer to the corresponding paper, "Making the Most of Text Semantics to Improve Biomedical Vision-Language Processing", ECCV'22 for additional details on the model training and evaluation.

For additional inference pipelines with CXR-BERT, please refer to the HI-ML-Multimodal GitHub repository.

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

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

GPU в ailist

Универсальный рантайм · fill-mask

Можно запустить

Подбираем GPU…

Класс архитектуры
CXRBertModel
Ревизия весов
5157bdb

0 моделей