Text Classification
Transformers
Safetensors
Vietnamese
roberta
clickbait-detection
vietnamese
viclickbait-2025
Instructions to use BaoNhan/phobert-base-ViClickbait-2025 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use BaoNhan/phobert-base-ViClickbait-2025 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="BaoNhan/phobert-base-ViClickbait-2025")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("BaoNhan/phobert-base-ViClickbait-2025") model = AutoModelForSequenceClassification.from_pretrained("BaoNhan/phobert-base-ViClickbait-2025", device_map="auto") - Notebooks
- Google Colab
- Kaggle
PhoBERT-base — ViClickbait-2025
Fine-tuned from vinai/phobert-base for binary Vietnamese clickbait detection.
Experimental setup
- Input: headline paired with lead paragraph; no URL, source, category, publish time, image, or engagement metadata.
- Fixed 80/10/10 split using
StratifiedGroupKFoldwith seed 42. - Fine-tuning seeds: [42, 22, 202]; 3 epochs per seed.
- Development Macro-F1 selects checkpoints and representative seed.
- Weighted cross-entropy from training-label frequencies:
True. - Effective batch size: 8; max length: 256.
Results
| Metric | Mean ± sample std |
|---|---|
| Test Macro-F1 | 0.7748 ± 0.0074 |
| Test accuracy | 0.7973 ± 0.0074 |
| Dev Macro-F1 | 0.7760 ± 0.0105 |
Representative seed: 22, selected only by development Macro-F1.
Per-seed
| seed | dev_macro_f1 | test_macro_f1 | test_accuracy |
|---|---|---|---|
| 22 | 0.7881 | 0.7819 | 0.8041 |
| 42 | 0.7686 | 0.7671 | 0.7895 |
| 202 | 0.7714 | 0.7754 | 0.7982 |
Labels
0: non-clickbait1: clickbait
Usage
from transformers import AutoModelForSequenceClassification, AutoTokenizer
model_id = "BaoNhan/phobert-base-ViClickbait-2025"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForSequenceClassification.from_pretrained(model_id)
title = "Tiêu đề bài báo"
lead = "Đoạn dẫn của bài báo"
inputs = tokenizer(title, lead, return_tensors="pt", truncation=True, max_length=256)
prediction = model(**inputs).logits.argmax(dim=-1).item()
print(model.config.id2label[prediction])
Dataset
- Nguyen et al. (2025), ViClickbait-2025: A comprehensive dataset for Vietnamese clickbait detection. https://doi.org/10.1016/j.dib.2025.112164
- Dataset: https://doi.org/10.17632/3wc46bfcjc.1
Limitations
The dataset is small, temporally bounded to 2023–2025, and collected from eight Vietnamese news platforms. Results may not transfer to social media, other publishers, or emerging clickbait styles.
- Downloads last month
- 12