/ Модель

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

Контекст
514 токенов
Параметры
153 млн
Лицензия
Apache 2.0
Архитектура
roberta · dense
Опубликована
2 мар 2022

roberta-base-biomedical-clinical-es

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

Испанская RoBERTa для заполнения пропусков в биомедицинских и клинических текстах и дообучения для медицинского NLP.

4 006скачиваний за 30 дней20лайковвеса обновлены15 ноя 2022

Бенчмарки

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

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

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

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

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

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

Испаноязычная предварительно обученная языковая модель RoBERTa для биомедицинских и клинических текстов, разработанная подразделением Text Mining Unit (TeMU) Барселонского суперкомпьютерного центра. Модель содержит 153,2 млн параметров, использует плотную архитектуру RobertaForMaskedLM и принимает последовательности длиной до 514 токенов. Она обучена на испаноязычном корпусе объёмом более миллиарда токенов, включающем медицинские материалы и клинические документы.

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

В карточке описана оценка на наборах PharmaCoNER, CANTEMIST и ICTUSnet с сопоставлением с mBERT и BETO. Авторы предупреждают, что встроенные смещения не оценивались; обучающие данные собраны из разных источников, в том числе с помощью веб-краулинга.

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

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

Ограничения

Модель готова к применению для заполнения масок; для NER и классификации её необходимо дообучить под целевую задачу. Авторы не оценивали смещения, которые могут присутствовать из-за состава обучающих корпусов.

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

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

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

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

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

Открыть на Hugging Face

Biomedical-clinical language model for Spanish

Table of contents

Model description

Biomedical pretrained language model for Spanish. This model is a RoBERTa-based model trained on a biomedical-clinical corpus in Spanish collected from several sources.

Intended uses and limitations

The model is ready-to-use only for masked language modelling to perform the Fill Mask task (try the inference API or read the next section). However, it is intended to be fine-tuned on downstream tasks such as Named Entity Recognition or Text Classification.

How to use

from transformers import AutoTokenizer, AutoModelForMaskedLM
tokenizer = AutoTokenizer.from_pretrained("BSC-TeMU/roberta-base-biomedical-es")
model = AutoModelForMaskedLM.from_pretrained("BSC-TeMU/roberta-base-biomedical-es")
from transformers import pipeline
unmasker = pipeline('fill-mask', model="BSC-TeMU/roberta-base-biomedical-es")
unmasker("El único antecedente personal a reseñar era la <mask> arterial.")
# Output
[
  {
    "sequence": " El único antecedente personal a reseñar era la hipertensión arterial.",
    "score": 0.9855039715766907,
    "token": 3529,
    "token_str": " hipertensión"
  },
  {
    "sequence": " El único antecedente personal a reseñar era la diabetes arterial.",
    "score": 0.0039140828885138035,
    "token": 1945,
    "token_str": " diabetes"
  },
  {
    "sequence": " El único antecedente personal a reseñar era la hipotensión arterial.",
    "score": 0.002484665485098958,
    "token": 11483,
    "token_str": " hipotensión"
  },
  {
    "sequence": " El único antecedente personal a reseñar era la Hipertensión arterial.",
    "score": 0.0023484621196985245,
    "token": 12238,
    "token_str": " Hipertensión"
  },
  {
    "sequence": " El único antecedente personal a reseñar era la presión arterial.",
    "score": 0.0008009297889657319,
    "token": 2267,
    "token_str": " presión"
  }
]

Limitations and bias

At the time of submission, no measures have been taken to estimate the bias embedded in the model. However, we are well aware that our models may be biased since the corpora have been collected using crawling techniques on multiple web sources. We intend to conduct research in these areas in the future, and if completed, this model card will be updated.

Training

The training corpus has been tokenized using a byte version of Byte-Pair Encoding (BPE) used in the original RoBERTA model with a vocabulary size of 52,000 tokens. The pretraining consists of a masked language model training at the subword level following the approach employed for the RoBERTa base model with the same hyperparameters as in the original work. The training lasted a total of 48 hours with 16 NVIDIA V100 GPUs of 16GB DDRAM, using Adam optimizer with a peak learning rate of 0.0005 and an effective batch size of 2,048 sentences.

The training corpus is composed of several biomedical corpora in Spanish, collected from publicly available corpora and crawlers, and a real-world clinical corpus collected from more than 278K clinical documents and notes. To obtain a high-quality training corpus while retaining the idiosyncrasies of the clinical language, a cleaning pipeline has been applied only to the biomedical corpora, keeping the clinical corpus uncleaned. Essentially, the cleaning operations used are:

  • data parsing in different formats
  • sentence splitting
  • language detection
  • filtering of ill-formed sentences
  • deduplication of repetitive contents
  • keep the original document boundaries

Then, the biomedical corpora are concatenated and further global deduplication among the biomedical corpora have been applied. Eventually, the clinical corpus is concatenated to the cleaned biomedical corpus resulting in a medium-size biomedical-clinical corpus for Spanish composed of more than 1B tokens. The table below shows some basic statistics of the individual cleaned corpora:

NameNo. tokensDescription
Medical crawler745,705,946Crawler of more than 3,000 URLs belonging to Spanish biomedical and health domains.
Clinical cases misc.102,855,267A miscellany of medical content, essentially clinical cases. Note that a clinical case report is a scientific publication where medical practitioners share patient cases and it is different from a clinical note or document.
Clinical notes/documents91,250,080Collection of more than 278K clinical documents, including discharge reports, clinical course notes and X-ray reports, for a total of 91M tokens.
Scielo60,007,289Publications written in Spanish crawled from the Spanish SciELO server in 2017.
BARR2_background24,516,442Biomedical Abbreviation Recognition and Resolution (BARR2) containing Spanish clinical case study sections from a variety of clinical disciplines.
Wikipedia_life_sciences13,890,501Wikipedia articles crawled 04/01/2021 with the Wikipedia API python library starting from the "Ciencias_de_la_vida" category up to a maximum of 5 subcategories. Multiple links to the same articles are then discarded to avoid repeating content.
Patents13,463,387Google Patent in Medical Domain for Spain (Spanish). The accepted codes (Medical Domain) for Json files of patents are: "A61B", "A61C","A61F", "A61H", "A61K", "A61L","A61M", "A61B", "A61P".
EMEA5,377,448Spanish-side documents extracted from parallel corpora made out of PDF documents from the European Medicines Agency.
mespen_Medline4,166,077Spanish-side articles extracted from a collection of Spanish-English parallel corpus consisting of biomedical scientific literature. The collection of parallel resources are aggregated from the MedlinePlus source.
PubMed1,858,966Open-access articles from the PubMed repository crawled in 2017.

Evaluation

The model has been evaluated on the Named Entity Recognition (NER) using the following datasets:

  • PharmaCoNER: is a track on chemical and drug mention recognition from Spanish medical texts (for more info see: https://temu.bsc.es/pharmaconer/).

  • CANTEMIST: is a shared task specifically focusing on named entity recognition of tumor morphology, in Spanish (for more info see: https://zenodo.org/record/3978041#.YTt5qH2xXbQ).

  • ICTUSnet: consists of 1,006 hospital discharge reports of patients admitted for stroke from 18 different Spanish hospitals. It contains more than 79,000 annotations for 51 different kinds of variables.

The evaluation results are compared against the mBERT and BETO models:

F1 - Precision - Recallroberta-base-biomedical-clinical-esmBERTBETO
PharmaCoNER90.04 - 88.92 - 91.1887.46 - 86.50 - 88.4688.18 - 87.12 - 89.28
CANTEMIST83.34 - 81.48 - 85.3082.61 - 81.12 - 84.1582.42 - 80.91 - 84.00
ICTUSnet88.08 - 84.92 - 91.5086.75 - 83.53 - 90.2385.95 - 83.10 - 89.02

Additional information

Author

Text Mining Unit (TeMU) at the Barcelona Supercomputing Center (bsc-temu@bsc.es)

Contact information

For further information, send an email to plantl-gob-es@bsc.es

Copyright

Copyright by the Spanish State Secretariat for Digitalization and Artificial Intelligence (SEDIA) (2022)

Licensing information

Apache License, Version 2.0

Funding

This work was funded by the Spanish State Secretariat for Digitalization and Artificial Intelligence (SEDIA) within the framework of the Plan-TL.

Citation information

If you use our models, please cite our latest preprint:


@misc{carrino2021biomedical,
      title={Biomedical and Clinical Language Models for Spanish: On the Benefits of Domain-Specific Pretraining in a Mid-Resource Scenario}, 
      author={Casimiro Pio Carrino and Jordi Armengol-Estapé and Asier Gutiérrez-Fandiño and Joan Llop-Palao and Marc Pàmies and Aitor Gonzalez-Agirre and Marta Villegas},
      year={2021},
      eprint={2109.03570},
      archivePrefix={arXiv},
      primaryClass={cs.CL}
}

If you use our Medical Crawler corpus, please cite the preprint:


@misc{carrino2021spanish,
      title={Spanish Biomedical Crawled Corpus: A Large, Diverse Dataset for Spanish Biomedical Language Models}, 
      author={Casimiro Pio Carrino and Jordi Armengol-Estapé and Ona de Gibert Bonet and Asier Gutiérrez-Fandiño and Aitor Gonzalez-Agirre and Martin Krallinger and Marta Villegas},
      year={2021},
      eprint={2109.07765},
      archivePrefix={arXiv},
      primaryClass={cs.CL}
}

Disclaimer

The models published in this repository are intended for a generalist purpose and are available to third parties. These models may have bias and/or any other undesirable distortions.

When third parties, deploy or provide systems and/or services to other parties using any of these models (or using systems based on these models) or become users of the models, they should note that it is their responsibility to mitigate the risks arising from their use and, in any event, to comply with applicable regulations, including regulations regarding the use of Artificial Intelligence.

In no event shall the owner of the models (SEDIA – State Secretariat for Digitalization and Artificial Intelligence) nor the creator (BSC – Barcelona Supercomputing Center) be liable for any results arising from the use made by third parties of these models.

Los modelos publicados en este repositorio tienen una finalidad generalista y están a disposición de terceros. Estos modelos pueden tener sesgos y/u otro tipo de distorsiones indeseables.

Cuando terceros desplieguen o proporcionen sistemas y/o servicios a otras partes usando alguno de estos modelos (o utilizando sistemas basados en estos modelos) o se conviertan en usuarios de los modelos, deben tener en cuenta que es su responsabilidad mitigar los riesgos derivados de su uso y, en todo caso, cumplir con la normativa aplicable, incluyendo la normativa en materia de uso de inteligencia artificial.

En ningún caso el propietario de los modelos (SEDIA – Secretaría de Estado de Digitalización e Inteligencia Artificial) ni el creador (BSC – Barcelona Supercomputing Center) serán responsables de los resultados derivados del uso que hagan terceros de estos modelos.

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

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

GPU в ailist

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

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

Подбираем GPU…

Класс архитектуры
RobertaForMaskedLM
Ревизия весов
c6bfaa3

0 моделей