/ Модель

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

Лицензия
Своя лицензия
Библиотека
transformers
Опубликована
28 мар 2024

roberta-large-llm-content-detector

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

Бинарный классификатор SuperAnnotate на базе RoBERTa Large для определения, был ли текст сгенерирован языковой моделью.

203скачиваний за 30 дней8лайковвеса обновлены17 мая 2024

Бенчмарки

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

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

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

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

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

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

SuperAnnotate разработала классификатор для выявления текста, сгенерированного языковыми моделями. Это бинарная модель последовательностей на базе RoBERTa Large, дообученная на наборах HC3 и IDMGSP; она выдаёт один результат классификации для входного текста. Модель рассчитана прежде всего на английский язык и предназначена для проверки авторства текста, анализа учебных и научных работ, выявления мошенничества и проверки обучающих данных.

При обучении использовались около 20 тысяч сбалансированных пар «текст — метка». В README приведено сравнение с другими детекторами на бенчмарке из 1 000 примеров, однако его результаты сами по себе не гарантируют точность на новых источниках и типах текстов. Лицензия указана как SAIPL; перед использованием следует ознакомиться с её условиями.

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

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

Ограничения

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

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

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

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

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

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

Открыть на Hugging Face

Description

The model designed to detect generated/synthetic text.
At the moment, such functionality is critical for determining the author of the text. It's critical for your training data, detecting fraud and cheating in scientific and educational areas.
Couple of articles about this problem: Problems with Synthetic Data | Risk of LLMs in Education

Model Details

Model Description

  • Model type: The custom architecture for binary sequence classification based on pre-trained RoBERTa, with a single output label.
  • Language(s): Primarily English.
  • License: SAIPL
  • Finetuned from model: RoBERTa Large

Model Sources

  • Repository: GitHub for HTTP service

Training Data

The training data was sourced from two open datasets with different proportions and underwent filtering:

  1. HC3 | 63%
  2. IDMGSP | 37%

As a result, the training dataset contained approximately 20k pairs of text-label with an approximate balance of classes.
It's worth noting that the dataset's texts follow a logical structure:
Human-written and model-generated texts refer to a single prompt/instruction, though the prompts themselves were not used during training.

[!NOTE] Furthermore, key n-grams (n ranging from 2 to 5) that exhibited the highest correlation with target labels were identified and subsequently removed from the training data utilizing the chi-squared test.

Peculiarity

During training, one of the priorities was not only maximizing the quality of predictions but also avoiding overfitting and obtaining an adequately confident predictor.
We are pleased to achieve the following state of model calibration:

Usage

Pre-requirements:
Install generated_text_detector
Run following command: pip install git+https://github.com/superannotateai/generated_text_detector.git@v1.0.0

from generated_text_detector.utils.model.roberta_classifier import RobertaClassifier
from transformers import AutoTokenizer
import torch.nn.functional as F


model = RobertaClassifier.from_pretrained("SuperAnnotate/roberta-large-llm-content-detector")
tokenizer = AutoTokenizer.from_pretrained("SuperAnnotate/roberta-large-llm-content-detector")

text_example = "It's not uncommon for people to develop allergies or intolerances to certain foods as they get older. It's possible that you have always had a sensitivity to lactose (the sugar found in milk and other dairy products), but it only recently became a problem for you. This can happen because our bodies can change over time and become more or less able to tolerate certain things. It's also possible that you have developed an allergy or intolerance to something else that is causing your symptoms, such as a food additive or preservative. In any case, it's important to talk to a doctor if you are experiencing new allergy or intolerance symptoms, so they can help determine the cause and recommend treatment."

tokens = tokenizer.encode_plus(
    text_example,
    add_special_tokens=True,
    max_length=512,
    padding='longest',
    truncation=True,
    return_token_type_ids=True,
    return_tensors="pt"
)

_, logits = model(**tokens)

proba = F.sigmoid(logits).squeeze(1).item()

print(proba)

Training Detailes

A custom architecture was chosen for its ability to perform binary classification while providing a single model output, as well as for its customizable settings for smoothing integrated into the loss function.

Training Arguments:

  • Base Model: FacebookAI/roberta-large
  • Epochs: 10
  • Learning Rate: 5e-04
  • Weight Decay: 0.05
  • Label Smoothing: 0.1
  • Warmup Epochs: 4
  • Optimizer: SGD
  • Scheduler: Linear schedule with warmup

Performance

The model was evaluated on a benchmark consisting of a holdout subset of training data, alongside a closed subset of SuperAnnotate data.
The benchmark comprises 1k samples, with 200 samples per category.
The model's performance is compared with open-source solutions and popular API detectors in the table below:

Model/APIWikipediaReddit QASA instructionPapersAverage
Hello-SimpleAI0.970.950.820.690.86
RADAR0.470.840.590.820.68
GPTZero0.720.790.900.670.77
Originality.ai0.910.970.770.930.89
LLM content detector0.880.950.840.810.87

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

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

GPU в ailist

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

Нельзя запустить

Архитектура ? неизвестна transformers в образе рантайма.

Ревизия весов
27dc31d

0 моделей