/ Модель

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

Контекст
512 токенов
Параметры
137 млн
Лицензия
Apache 2.0
Архитектура
bert · dense
Опубликована
1 июл 2022

bert-base-styleclassification-subjective-neutral

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

Классификатор BERT определяет субъективную предвзятость или нейтральный тон текста и помогает оценивать перенос стиля.

369скачиваний за 30 дней9лайковвеса обновлены12 июл 2022

Бенчмарки

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

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

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

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

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

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

Модель cffl/bert-base-styleclassification-subjective-neutral — классификатор текста на базе bert-base-uncased, дообученный на корпусе Wiki Neutrality Corpus (WNC), разработанный для исследовательских задач в области NLP и анализа данных. Она определяет, звучит ли текст субъективно и предвзято или нейтрально, и предназначена для оценки результатов переноса стиля текста, включая расчёт интенсивности переноса и анализ важности признаков.

Модель содержит 136,7 млн параметров, использует архитектуру BERT для классификации последовательностей, принимает текст и выдаёт метки классов и вероятности. Максимальный контекст — 512 токенов. Лицензия — Apache-2.0.

Классификатор пригоден для экспериментов и сравнительной оценки систем преобразования субъективного текста в нейтральный. Его предсказания отражают определение нейтральности, принятое в политике NPOV Википедии, и могут не совпадать с пользовательским пониманием субъективности. Корпус содержит проблемы качества данных; модель и датасет недостаточно оценены с точки зрения точности и смещений. Разработчики не рекомендуют применять модель в производственных системах без предварительного исследования смещений для конкретного сценария.

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

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

Ограничения

Определение нейтральности опирается на NPOV-политику Википедии и может расходиться с пониманием пользователя; данные содержат проблемы качества, а качество и смещения модели недостаточно оценены. Производственное применение не рекомендуется без изучения смещений для конкретного сценария.

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

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

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

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

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

Открыть на Hugging Face

bert-base-styleclassification-subjective-neutral

Model description

This bert-base-uncased model has been fine-tuned on the Wiki Neutrality Corpus (WNC) - a parallel corpus of 180,000 biased and neutralized sentence pairs along with contextual sentences and metadata. The model can be used to classify text as subjectively biased vs. neutrally toned.

The development and modeling efforts that produced this model are documented in detail through this blog series.

Intended uses & limitations

The model is intended purely as a research output for NLP and data science communities. We developed this model for the purpose of evaluating text style transfer output. Specifically, we derive a Style Transfer Intensity (STI) metric from the classifier's output distributions. We also extract feautre importances from the model via Integrated Gradients with support a Content Preservation Score (CPS).

We imagine this model will be used by researchers to better understand the limitations, robustness, and generalization of text style transfer models. Ultimately, we hope this model will inspire future work on text style transfer and serve as a benchmarking tool for the style attribute of subjectivity bias, specifically.

Any production use of this model - whether commercial or not - is currently not intended. This is because, as the team at OpenAI points out, large langauge models like BERT reflect biases inherent to the systems they were trained on, so we do not recommend that they be deployed into systems that interact with humans, unless the deployers first carry out a study of biases relevant to the intended use-case. Neither the model nor the WNC dataset has been sufficiently evaluated for performance and bias.

As we discuss in the blog series, since the WNC is a parallel dataset and we formulate the learning task as a supervised problem, the model indirectly adopts Wikipedia's NPOV policy as the definition for "neutrality" and "subjectivity". The NPOV policy may not fully reflect an end users assumed/intended meaning of subjectivity because the notion of subjectivity itself can be...well, subjective.

We discovered through our exploratory work that the WNC does contain data quality issues that will contribute to unintended bias in the model. For example, some NPOV revisions introduce factual information outside the context of the prompt as a means to correct bias. We believe these factual based edits are out of scope for a subjective-to-neutral style transfer modeling task, but exist here nonetheless.

How to use

This model can be used directly with a HuggingFace pipeline for text2text-generation.

>>> from transformers import pipeline

>>> classify = pipeline(
    task="text-classification",
    model="cffl/bert-base-styleclassification-subjective-neutral",
    return_all_scores=True,
)
>>> input_text = "chemical abstracts service (cas), a prominent division of the american chemical society, is the world's leading source of chemical information."
>>> classify(input_text)

[[{'label': 'SUBJECTIVE', 'score': 0.9765084385871887},
  {'label': 'NEUTRAL', 'score': 0.023491567000746727}]]

Training procedure

For training, we initialize HuggingFace’s AutoModelforSequenceClassification with bert-base-uncased pre-trained weights and perform a hyperparameter search over: batch size [16, 32], learning rate [3e-05, 3e-06, 3e-07], weight decay [0, 0.01, 0.1] and batch shuffling [True, False] while training for 15 epochs.

We monitor performance using accuracy as we have a perfectly balanced dataset and assign equal cost to false positives and false negatives. The best performing model produces an overall accuracy of 72.50% -- please reference our training script and classifier evaluation notebook for further details.

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

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

GPU в ailist

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

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

Подбираем GPU…

Класс архитектуры
BertForSequenceClassification
Ревизия весов
1339b8d

0 моделей