/ Модель

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

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

sciroshot

Классификация текстаТекст → label5 профессий

SCIroShot — англоязычная модель RoBERTa-large для классификации научных и других текстов по произвольным заданным категориям.

122скачиваний за 30 дней10лайковвеса обновлены29 окт 2024

Бенчмарки

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

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

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

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

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

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

SCIroShot — англоязычная модель для классификации текста без заранее заданного набора классов, разработанная SIRIS Lab и Language Technologies Unit Barcelona Supercomputing Center. Это дообученная RoBERTa-large с 454,1 млн параметров, которая использует подход, основанный на проверке следования (entailment), и предназначена прежде всего для классификации научных текстов по заданным пользователем категориям.

Модель обучали на более чем двух миллионах англоязычных научных статей из Microsoft Academic Graph: заголовках, аннотациях и категориях научных дисциплин. Она также может применяться к текстам общего назначения; карточка сообщает о сильных результатах в научной области и конкурентных результатах на некоторых общих задачах. Контекст составляет 514 токенов. Лицензия — Apache 2.0.

Возможное смещение и токсичность модели отдельно не оценивались. Качество может зависеть от области текста и выбранных меток; для научной классификации модель обучалась на данных с публикациями 2000–2021 годов.

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

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

Ограничения

Смещение и токсичность отдельно не оценивались; результаты могут зависеть от предметной области и формулировок категорий. Научные обучающие данные охватывают публикации 2000–2021 годов.

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

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

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

Также подходит для

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

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

Открыть на Hugging Face

SCIroShot

Overview

  • Model type: Language Model
  • Architecture: RoBERTa-large
  • Language: English
  • License: Apache 2.0
  • Task: Zero-Shot Text Classification
  • Data: Microsoft Academic Graph
  • Additional Resources:

Model description

SCIroShot is an entailment-based Zero-Shot Text Classification model that has been fine-tuned using a self-made dataset composed of scientific articles from Microsoft Academic Graph (MAG). The resulting model achieves SOTA performance in the scientific domain and very competitive results in other areas.

Intended Usage

This model is intended to be used for zero-shot text classification in English.

How to use

from transformers import pipeline

zstc = pipeline("zero-shot-classification", model="BSC-LT/sciroshot")

sentence = "Leo Messi is the best player ever."
candidate_labels = ["politics", "science", "sports", "environment"]
template = "This example is {}"

output = zstc(sentence, candidate_labels, hypothesis_template=template, multi_label=False)

print(output)
print(f'Predicted class: {output["labels"][0]}')

Limitations and bias

No measures have been taken to estimate the bias and toxicity embedded in the model.

Even though the fine-tuning data (which is of a scientific nature) may seem harmless, it is important to note that the corpus used to pre-train the vanilla model is very likely to contain a lot of unfiltered content from the internet, as stated in the RoBERTa-large model card.

Training

Training data

Our data builds on top of scientific-domain annotated data from Microsoft Academic Graph (MAG). This database consists of a heterogeneous graph with billions of records from both scientific publications and patents, in addition to metadata information such as the authors, institutions, journals, conferences and their citation relationships. The documents are organized in a six-level hierarchical structure of scientific concepts, where the two top-most levels are manually curated in order to guarantee a high level of accuracy.

To create the training corpus, a random sample of scientific articles with a publication year between 2000 and 2021 were retrieved from MAG with their respective titles and abstracts in English. This results in over 2M documents with their corresponding Field Of Study, which was obtained from the 1-level MAG taxonomy (292 possible classes, such as "Computational biology" or "Transport Engineering").

The fine-tuning dataset was constructed in a weakly supervised manner by converting text classification data to the entailment format. Using the relationship between scientific texts and their matching concepts in the 1-level MAG taxonomy we are able to generate the premise- hypothesis pairs corresponding to the entailment label. Conversely, we generate the pairs for the neutral label by removing the actual relationship between the texts and their scientific concepts and creating a virtual relationship with those to which they are not matched.

Training procedure

The newly-created scientific dataset described in the previous section was used to fine-tune a 355M parameters RoBERTa model on the entailment task. To do so, the model has to compute the entailment score between every text that is fed to it and all candidate labels. The final prediction would be the highest-scoring class in a single-label classification setup, or the N classes above a certain threshold in a multi-label scenario.

A subset of 52 labels from the training data were kept apart so that they could be used as a development set of fully-unseen classes. As a novelty, the validation was not performed on the entailment task (which is used a proxy) but directly on the target text classification task. This allows us to stop training at the right time via early stopping, which prevents the model from "overfitting" to the training task. This method was our way to counteract an effect that was empirically discovered during the experimentation period, where it was observed that after a certain point the model can start to worsen in the target task (ZSTC) despite still continuing to improve in the training task (RTE). The simple act of shortening the training time led to a boost in performance.

Read the paper for more details on the methodology and the analysis of RTE/ZSTC correlation.

Evaluation

Evaluation data

The model's performance was evaluated on a collection of disciplinary-labeled textual datasets, both from the scientific domain (closer to training data) and the general domain (to assess generalizability).

The following table provides an overview of the number of examples and labels for each dataset:

DatasetLabelsSize
arXiv113,838
SciDocs-MeSH1116,433
SciDocs-MAG1917,501
Konstanz2410,000
Elsevier2614,738
PubMed1095,000
Topic Categorization (Yahoo! Answers)1060,000
Emotion Detection (UnifyEmotion)1015,689
Situation Frame Detection (Situation Typing)123,311

Please refer to the paper for further details on each particular dataset.

Evaluation results

These are the official results reported in the paper:

Scientific domain benchmark

ModelarXivSciDocs-MesHSciDocs-MAGKonstanzElsevierPubMed
fb/bart-large-mnli33.2866.18🔥51.7754.6228.4131.59🔥
SCIroShot42.22🔥59.3469.86🔥66.07🔥54.42🔥27.93

General domain benchmark

ModelTopicEmotionSituation
RTE (Yin et al., 2019)43.812.637.2🔥
FEVER (Yin et al., 2019)40.124.721.0
MNLI (Yin et al., 2019)37.922.315.4
NSP (Ma et al., 2021)50.616.525.8
NSP-Reverse (Ma et al., 2021)53.116.119.9
SCIroShot59.08🔥24.94🔥27.42

All the numbers reported above represent label-wise weighted F1 except for the Topic classification dataset, which is evaluated in terms of accuracy following the notation from (Yin et al., 2019).

Additional information

Authors

  • SIRIS Lab, Research Division of SIRIS Academic.
  • Language Technologies Unit, Barcelona Supercomputing Center.

Contact

For further information, send an email to either langtech@bsc.es or info@sirisacademic.com.

License

This work is distributed under a Apache License, Version 2.0.

Funding

This work was partially funded by 2 projects under EU’s H2020 Research and Innovation Programme:

  • INODE (grant agreement No 863410).
  • IntelComp (grant agreement No 101004870).

Citation

@inproceedings{pamies2023weakly,
  title={A weakly supervised textual entailment approach to zero-shot text classification},
  author={P{\`a}mies, Marc and Llop, Joan and Multari, Francesco and Duran-Silva, Nicolau and Parra-Rojas, C{\'e}sar and Gonz{\'a}lez-Agirre, Aitor and Massucci, Francesco Alessandro and Villegas, Marta},
  booktitle={Proceedings of the 17th Conference of the European Chapter of the Association for Computational Linguistics},
  pages={286--296},
  year={2023}
}

Disclaimer

The model published in this repository is intended for a generalist purpose and is made available to third parties under a Apache v2.0 License.

Please keep in mind that the model may have bias and/or any other undesirable distortions. When third parties deploy or provide systems and/or services to other parties using this model (or a system based on it) or become users of the model itself, they should note that it is under their responsibility to mitigate the risks arising from its use and, in any event, to comply with applicable regulations, including regulations regarding the use of Artificial Intelligence.

In no event shall the owners and creators of the model be liable for any results arising from the use made by third parties.

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

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

GPU в ailist

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

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

Подбираем GPU…

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

0 моделей