Downloads · 30 days
9
15% of all-time downloads
afafos/trade-news-dedup-bert-base-uncased-qqp
trade-news-dedup-bert-base-uncased-qqp is a text classification model from afafos. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as apache-2.0.
Event-level duplicate detection in trade news — Sentence-pair / paraphrase classifier (BERT), fine-tuned on the weakly-supervised SilverSet of the TradeNewsEventDedup project.
Downloads · 30 days
9
15% of all-time downloads
All-time downloads
61
Public
Parameters
109M
438 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors438 MB · 100%
From the Hugging Face model README
Event-level duplicate detection in trade news — Sentence-pair / paraphrase classifier (BERT), fine-tuned on the weakly-supervised SilverSet of the TradeNewsEventDedup project.
Обнаружение дубликатов событий во внешнеторговых новостях: бинарная классификация пар новостных саммари (дубликат / не-дубликат) на уровне идентичности торгового события.
License note: The base checkpoint
textattack/bert-base-uncased-QQPdoes not declare a license; the underlyingbert-base-uncasedis Apache-2.0.
Given two trade-news summaries, predict whether they describe the same real-world trade
event (same country, commodity, trade action, numerical values and time) — not mere text
similarity. The model was fine-tuned with structured hard negatives (semantically close but
materially different cases: updates U and related events R).
textattack/bert-base-uncased-QQPlyutovad/TradeNewsEventDedup — SilverSet (16,097 LLM-labeled pairs, fine-tuning only)1 = duplicate, class 0 = non-duplicate.| Metric | Value |
|---|---|
| PR-AUC | 0.9176 |
| F1 | 0.8885 |
| Accuracy | 0.9040 |
| Recall | 0.9183 |
Thresholds are tuned on the GoldSet (optimistic estimate). Baselines (lexical/embedding similarity) reach high recall but low precision; fine-tuning with hard negatives improves precision and reduces false positives. Full protocol and ablations are in the paper.
import torch
from transformers import AutoTokenizer, AutoModelForSequenceClassification
repo = "afafos/trade-news-dedup-bert-base-uncased-qqp"
tok = AutoTokenizer.from_pretrained(repo)
model = AutoModelForSequenceClassification.from_pretrained(repo).eval()
a = "Iraq and Lebanon signed an agreement and seven MoUs on trade and investment."
b = "Iraq and Lebanon announced a new partnership framework, including seven MoUs."
with torch.no_grad():
logits = model(**tok(a, b, return_tensors="pt", truncation=True)).logits
p_duplicate = torch.softmax(logits, dim=-1)[0, 1].item() # class 1 == duplicate
print(p_duplicate)
@misc{tradenews_event_dedup,
title = {Event-Level Duplicate Detection in Trade News under Hard-Negative Supervision},
author = {Liutova, Daria and Kamalov, Said and Afanasev, Andrew and Mukhtarov, Timerlan},
year = {2026},
note = {Dataset: lyutovad/TradeNewsEventDedup; Code: https://github.com/SaidKamalov/trade-news-duplicates}
}