/ Модель

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

Контекст
512 токенов
Параметры
205 млн
Архитектура
bert · dense

russian-inappropriate-messages

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

BERT-классификатор выявляет неуместные русскоязычные сообщения для дополнительной фильтрации контента.

380скачиваний за 30 дней27лайковвеса обновлены18 мая 2021

Бенчмарки

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

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

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

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

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

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

Модель apanc/russian-inappropriate-messages разработана для классификации русскоязычных сообщений на предмет неуместного содержания. Это плотная BERT-модель с головой классификации последовательностей, содержащая 205,1 млн параметров и принимающая текст длиной до 512 токенов. Она выявляет высказывания, которые могут нанести ущерб репутации автора, даже если в них нет обсценной лексики или токсичного намерения, например оправдание преступления или оскорбление чувств верующих.

Модель предназначена как дополнительный этап фильтрации после проверки на токсичность и обсценную лексику; для определения конкретной чувствительной темы README рекомендует использовать отдельную модель. На тестовой выборке авторы сообщают точность 0,89 и F1 0,78 для класса неуместных сообщений. Обучение и оценка проводились на примерах с полной уверенностью в разметке, поэтому качество на неоднозначных сообщениях может отличаться. Доступны веса PyTorch, TensorFlow и Flax. Лицензия CC BY-NC-SA 4.0 разрешает некоммерческое использование с указанием авторства и распространением производных материалов на тех же условиях.

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

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

Ограничения

Модель выявляет неуместность, а не заменяет детектор токсичности или обсценной лексики и сама не определяет точную чувствительную тему. Метрики получены на примерах с полной уверенностью в разметке; F1 для класса неуместных сообщений составляет 0,78.

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

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

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

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

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

Открыть на Hugging Face

General concept of the model

Proposed usage

The 'inappropriateness' substance we tried to collect in the dataset and detect with the model is NOT a substitution of toxicity, it is rather a derivative of toxicity. So the model based on our dataset could serve as an additional layer of inappropriateness filtering after toxicity and obscenity filtration. You can detect the exact sensitive topic by using another model. The proposed pipeline is shown in the scheme below.

alternativetext

You can also train one classifier for both toxicity and inappropriateness detection. The data to be mixed with toxic labelled samples could be found on our GitHub or on kaggle

Inappropraiteness intuition

This model is trained on the dataset of inappropriate messages of the Russian language. Generally, an inappropriate utterance is an utterance that has not obscene words or any kind of toxic intent, but can still harm the reputation of the speaker. Find some sample for more intuition in the table below. Learn more about the concept of inappropriateness in this article presented at the workshop for Balto-Slavic NLP at the EACL-2021 conference. Please note that this article describes the first version of the dataset, while the model is trained on the extended version of the dataset open-sourced on our GitHub or on kaggle. The properties of the dataset are the same as the one described in the article, the only difference is the size.

TextInappropriateCommentUnsafe topic
Ладно бы видного деятеля завалили а тут какого то ноунейм нигру преступникаyesОправдание убийстваoffline crime
Это нарушение УКРФ!noОсуждение нарушения законаoffline crime
Религия - это насилие высшего уровня. Верующего принуждают к вере еще в младенчестве.yesОскорбление чувств верующихreligion
Христиане, как вы относитесь к иноверцам, в частности к Гамалиилу и к уверовавшим в Иисуса фарисеям?noОбычные вопросы к верующим без намека на оскорбление их чувствreligion
Хорошо что проституция запрещенаnoОсуждение простуитуцииprostitution
Возьму бабки и сниму шлюх на выходныхyesПопуляризация проституцииprostitution

Metrics

The model was trained, validated, and tested only on the samples with 100% confidence, which allowed to get the following metrics on test set:

precisionrecallf1-scoresupport
00.920.930.937839
10.800.760.782726
accuracy0.8910565
macro avg0.860.850.8510565
weighted avg0.890.890.8910565

Licensing Information

Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

CC BY-NC-SA 4.0

Citation

If you find this repository helpful, feel free to cite our publication:

@inproceedings{babakov-etal-2021-detecting,
    title = "Detecting Inappropriate Messages on Sensitive Topics that Could Harm a Company{'}s Reputation",
    author = "Babakov, Nikolay  and
      Logacheva, Varvara  and
      Kozlova, Olga  and
      Semenov, Nikita  and
      Panchenko, Alexander",
    booktitle = "Proceedings of the 8th Workshop on Balto-Slavic Natural Language Processing",
    month = apr,
    year = "2021",
    address = "Kiyv, Ukraine",
    publisher = "Association for Computational Linguistics",
    url = "https://www.aclweb.org/anthology/2021.bsnlp-1.4",
    pages = "26--36",
    abstract = "Not all topics are equally {``}flammable{''} in terms of toxicity: a calm discussion of turtles or fishing less often fuels inappropriate toxic dialogues than a discussion of politics or sexual minorities. We define a set of sensitive topics that can yield inappropriate and toxic messages and describe the methodology of collecting and labelling a dataset for appropriateness. While toxicity in user-generated data is well-studied, we aim at defining a more fine-grained notion of inappropriateness. The core of inappropriateness is that it can harm the reputation of a speaker. This is different from toxicity in two respects: (i) inappropriateness is topic-related, and (ii) inappropriate message is not toxic but still unacceptable. We collect and release two datasets for Russian: a topic-labelled dataset and an appropriateness-labelled dataset. We also release pre-trained classification models trained on this data.",
}

Contacts

If you have any questions please contact Nikolay

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

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

GPU в ailist

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

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

Подбираем GPU…

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

0 моделей