/ Модель

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

Контекст
512 токенов
Лицензия
Apache 2.0
Архитектура
distilbert · dense
Базовая модель
phishing-email-detection-distilbert_v2.1
Библиотека
transformers
Опубликована
30 апр 2026

spot-distilbert-phishing

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

Дообученная DistilBERT классифицирует англоязычные письма как легитимные или потенциально фишинговые для анализа почтовых угроз.

57скачиваний за 30 дней0лайковвеса обновлены30 апр 2026

Бенчмарки

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

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

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

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

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

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

spotproject разработала и публикует эту модель как часть NLP-анализатора платформы SPOT для выявления потенциально фишинговых писем. Это дообученная модель DistilBERT для бинарной классификации: она присваивает тексту метку «обычное письмо» или «фишинг» и выдаёт вероятности двух классов. Модель содержит около 67 млн параметров; классификационная версия DistilBERT имеет 6 слоёв, размер скрытого представления 768 и 12 голов внимания. Для токенизации используется WordPiece, максимальная длина входа — 512 токенов. Лицензия — Apache-2.0.

Основной сценарий — оценка англоязычных тел писем: тему и текст письма можно объединить перед подачей модели. В SPOT её результат участвует в общем вердикте вместе с правилами, контекстными данными и, при необходимости, анализаторами на базе LLM; авторы не рекомендуют полагаться только на отдельное предсказание классификатора. Модель дообучена на SetFit/enron_spam, где положительная метка объединяет спам, маркетинговые письма и фишинг.

Данные обучения отражают преимущественно деловую переписку Enron начала 2000-х годов, поэтому качество на современных атаках, потребительских сообщениях и неанглийских письмах может быть ниже. Модель анализирует текст и не гарантирует обнаружение атак, представленных только изображениями, QR-кодами или другими нетекстовыми элементами; переиначивание текста и Unicode-обфускация также могут изменить результат. Вероятность класса «фишинг» не следует трактовать как откалиброванную оценку именно фишинга.

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

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

Ограничения

Обучающие данные основаны преимущественно на деловой переписке Enron начала 2000-х годов; качество на современных атаках и неанглийском тексте может снижаться. Положительная метка объединяет спам, маркетинг и фишинг, а текстовая модель может пропускать атаки в изображениях и QR-кодах; авторы отмечают уязвимость к перефразированию и Unicode-обфускации.

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

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

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

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

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

Открыть на Hugging Face

spot-distilbert-phishing

A DistilBERT-based binary email classifier that labels emails as phishing or legitimate. This is the model shipped inside SPOT's analyzer-nlp plugin; it is mirrored here as a public artefact so researchers, integrators, and auditors can inspect what SPOT actually runs in production.

Model description

  • Architecture: DistilBertForSequenceClassification (6 layers, 768-dim hidden state, 12 attention heads). Sequence-classification head with two output labels.
  • Base checkpoint: cybersectony/phishing-email-detection-distilbert_v2.1, re-headed from 4 labels to 2 (ignore_mismatched_sizes=True) and fine-tuned end-to-end.
  • Tokenizer: WordPiece, 30 522 tokens, max sequence length 512.
  • Parameters: ~67 million.
  • Output: a 2-logit softmax [P(legitimate), P(phishing)]. The predicted class is the argmax.

Intended use

  • Primary use case: phishing detection on inbound email bodies in the SPOT platform. The analyzer-orchestrator calls POST /internal/analyze on analyzer-nlp; the wrapper in analyzer-nlp loads this model and returns an AnalysisResult contributing to the workflow's aggregated phishing verdict.
  • Suitable inputs: English email bodies, ideally up to 512 tokens. Subjects and bodies are concatenated and tokenised together.
  • Out of scope: SPOT does not use this model in isolation. The workflow combines it with rule-based, contextual, and (optionally) LLM-based analyzers; the final phishing verdict is the orchestrator's aggregate, not this model's argmax. Using the raw classifier on its own will produce more false positives and false negatives than the end-to-end SPOT pipeline.

Training data

Fine-tuned on the public SetFit/enron_spam dataset:

SplitExamples
Train31 716
Test (used as eval split)2 000

Labels: 0 = legitimate, 1 = phishing/spam. The dataset is the Enron corpus relabelled by SetFit; it skews toward early-2000s English business email and reflects historical phishing patterns. Performance on contemporary phishing (modern brand impersonation, AI-generated text, image-only emails) is not guaranteed by this corpus, which is exactly why SPOT augments the verdict with rule-based and contextual analyzers.

Training procedure

Hyper-parameterValue
epochs3
per_device_train_batch_size16
per_device_eval_batch_size64
warmup_steps500
weight_decay0.01
optimizerAdamW (HF Trainer defaults)
max sequence length512 (truncated, padded to max)

Hardware: 2x NVIDIA Tesla T4 GPUs, run as a Kaggle notebook. Framework: Hugging Face transformers.Trainer.

Evaluation

Final metrics on the held-out SetFit/enron_spam test split (2 000 examples) at the end of epoch 3:

MetricValue
eval_loss0.0277
eval_runtime (s)16.80
eval_samples_per_second119.06

Accuracy / precision / recall / F1 were not computed during training. The production wrapper in analyzer-nlp/tests/ exercises the end-to-end SPOT integration on a larger, internal evaluation set; those numbers are not yet published here.

How to use

from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch

tok = AutoTokenizer.from_pretrained("spotproject/spot-distilbert-phishing")
model = AutoModelForSequenceClassification.from_pretrained("spotproject/spot-distilbert-phishing")

text = "Dear customer, your account has been suspended. Click here to verify..."
inputs = tok(text, return_tensors="pt", truncation=True, max_length=512)
with torch.no_grad():
    logits = model(**inputs).logits
probs = torch.softmax(logits, dim=-1)[0]
print({"legitimate": probs[0].item(), "phishing": probs[1].item()})

For the full SPOT integration ; with workflow context, knowledge-store enrichment, and aggregation across analyzers ; see analyzer-nlp on Codeberg.

Limitations and biases

  • Domain skew. Trained on Enron-era English business email. Expect degraded performance on consumer/mobile messaging, on non-English text, on modern AI-generated phishing, and on email-as-a-document attack vectors (HTML smuggling, image-only emails, QR-code phishing).
  • Fuzzy class boundary. The dataset's positive class collapses spam, marketing, and phishing into a single label. Treating the model's "phishing" probability as a calibrated phishing-only score will be optimistic.
  • No adversarial robustness guarantees. Simple rephrasing or Unicode obfuscation can flip the verdict. SPOT mitigates this by combining the model with non-NLP analyzers in the workflow orchestrator.
  • Personal data. Do not feed PII into a hosted version of this model without consent. The SPOT deployment runs the analyzer inside the customer's perimeter for that reason.

License

Apache-2.0, matching the analyzer-nlp source repository.

Citation

@software{spot_distilbert_phishing,
  title  = {spot-distilbert-phishing: phishing classifier for the SPOT platform},
  author = {SPOT Project},
  year   = {2026},
  url    = {https://huggingface.co/spotproject/spot-distilbert-phishing},
  license = {Apache-2.0}
}

Related

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

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

GPU в ailist

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

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

Подбираем GPU…

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

0 моделей