Text Classification
Transformers
Safetensors
Vietnamese
bert
vietnamese
fact-checking
claim-verification
natural-language-inference
vifactcheck
full-context
eacl-2027
Instructions to use BaoNhan/wikibert-ViFactCheck-FC with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use BaoNhan/wikibert-ViFactCheck-FC with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="BaoNhan/wikibert-ViFactCheck-FC")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("BaoNhan/wikibert-ViFactCheck-FC") model = AutoModelForSequenceClassification.from_pretrained("BaoNhan/wikibert-ViFactCheck-FC", device_map="auto") - Notebooks
- Google Colab
- Kaggle
File size: 4,699 Bytes
af42c2d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 | ---
language:
- vi
library_name: transformers
pipeline_tag: text-classification
base_model: "TurkuNLP/wikibert-base-vi-cased"
datasets:
- tranthaihoa/vifactcheck
tags:
- vietnamese
- text-classification
- fact-checking
- claim-verification
- natural-language-inference
- vifactcheck
- full-context
- eacl-2027
metrics:
- f1
- accuracy
---
# wikibert-ViFactCheck-FC
This model is `TurkuNLP/wikibert-base-vi-cased` fine-tuned for **VFC-FC** on ViFactCheck using the claim paired with **full article context**.
## Evaluation protocol
- Dataset size: 7,232 examples.
- Shared fixed stratified splits for FC and GE: 5,785 train / 723 development / 724 test.
- Labels: Supported, Refuted, and Not Enough Information.
- Fine-tuning seeds: [42, 22, 202].
- Training: 3 epoch(s), AdamW, learning rate 2e-05, weight decay 0.01, warmup ratio 0.1.
- Effective train batch size: **8** (hard-validated against every published run).
- Maximum sequence length: 256.
- Input mode: raw Vietnamese claim and passage.
- The claim is always preserved; only the second sequence (full article context) is truncated when the pair exceeds the encoder limit.
- Topic, author, outlet, URL and other source metadata are excluded from model inputs.
- No class weighting, resampling, retrieval model, sentence ranking, test-time model selection or external evidence is used.
- Checkpoints are selected by development Macro-F1. The representative published checkpoint is seed **42**, selected only by development Macro-F1.
## Results
Test metrics are reported as mean ± sample standard deviation over seeds [42, 22, 202].
| Metric | Mean ± std |
|---|---:|
| Test Macro-F1 | 0.6229 ± 0.0014 |
| Test accuracy | 0.6225 ± 0.0021 |
| Test macro precision | 0.6278 ± 0.0018 |
| Test macro recall | 0.6217 ± 0.0022 |
| Development Macro-F1 | 0.6125 ± 0.0085 |
### Per-seed results
| seed | dev_macro_f1 | test_macro_f1 | test_accuracy | micro_batch_size | gradient_accumulation_steps |
|-----------:|---------------:|----------------:|----------------:|-------------------:|------------------------------:|
| 22.000000 | 0.607921 | 0.624051 | 0.622928 | 8.000000 | 1.000000 |
| 42.000000 | 0.622352 | 0.621326 | 0.620166 | 8.000000 | 1.000000 |
| 202.000000 | 0.607321 | 0.623203 | 0.624309 | 8.000000 | 1.000000 |
## Label mapping
```json
{
"0": "supported",
"1": "refuted",
"2": "not_enough_information"
}
```
## Usage
```python
import torch
from transformers import AutoModelForSequenceClassification, AutoTokenizer
model_id = "BaoNhan/wikibert-ViFactCheck-FC"
tokenizer = AutoTokenizer.from_pretrained(model_id, use_fast=False)
model = AutoModelForSequenceClassification.from_pretrained(model_id)
claim = "Thông tin này đã được cơ quan chức năng xác nhận."
context = "Bài báo cung cấp bằng chứng liên quan đến phát biểu trên."
inputs = tokenizer(
claim,
context,
return_tensors="pt",
truncation="only_second",
max_length=256,
)
with torch.no_grad():
probabilities = model(**inputs).logits.softmax(dim=-1)[0]
predicted_id = int(probabilities.argmax())
print(model.config.id2label[predicted_id], probabilities.tolist())
```
## Files
- `aggregate_metrics.json`: aggregate metrics and training manifest.
- `artifacts/per_seed_results.csv`: one row per fine-tuning seed.
- `artifacts/seed_*_confusion_matrix.csv`: confusion matrix for each seed.
- `artifacts/seed_*_classification_report.json`: per-class metrics.
- `artifacts/seed_*_test_predictions.csv`: IDs, gold/predicted labels and probabilities; raw claims and passages are excluded.
## Limitations
ViFactCheck supplies the correct source article and therefore does not evaluate open-web evidence retrieval. **VFC-FC** can truncate relevant information in long articles and jointly measures verification plus robustness to irrelevant context. **VFC-GE** uses oracle gold evidence and must not be presented as a realistic end-to-end deployment setting. This model is a research classifier, not an automated arbiter of truth, and may produce confidently incorrect predictions.
## Dataset citation
```bibtex
@inproceedings{hoa2025vifactcheck,
title={ViFactCheck: A New Benchmark Dataset and Methods for Multi-domain News Fact-Checking in Vietnamese},
author={Hoa, Tran Thai and Duy, Tran Quang and Tran, Khanh Quoc and Nguyen, Kiet Van},
booktitle={Proceedings of the AAAI Conference on Artificial Intelligence},
volume={39},
number={1},
pages={308--316},
year={2025},
doi={10.1609/aaai.v39i1.32008}
}
```
|