--- language: - vi library_name: transformers license: mit pipeline_tag: text-classification tags: - SemViQA - binary-classification - fact-checking --- # SemViQA-BC: Vietnamese Binary Classification for Claim Verification ## Model Description **SemViQA-BC** is a core component of the **SemViQA** system, specifically designed for **binary classification** in Vietnamese fact-checking tasks. This model predicts whether a given claim is **SUPPORTED** or **REFUTED** based on retrieved evidence. ### **Model Information** - **Developed by:** [SemViQA Research Team](https://huggingface.co/SemViQA) - **Fine-tuned model:** [Ernie-M](https://huggingface.co/MoritzLaurer/ernie-m-large-mnli-xnli) - **Supported Language:** Vietnamese - **Task:** Binary Classification (Fact Verification) - **Dataset:** [ViWikiFC](https://arxiv.org/abs/2405.07615) SemViQA-BC is one of the key components of the two-step classification approach in the SemViQA system. It focuses on binary classification, determining whether a claim is SUPPORTED or REFUTED. This step follows an initial three-class classification, where claims are first categorized as SUPPORTED, REFUTED, or NOT ENOUGH INFORMATION (NEI). By incorporating Cross-Entropy Loss and Focal Loss, SemViQA-BC enhances precision in claim verification, ensuring more accurate fact-checking results ## Usage Example Direct Model Usage ```Python # Install semviqa !pip install semviqa # Initalize a pipeline import torch import torch.nn.functional as F from transformers import AutoTokenizer from semviqa.tvc.model import ClaimModelForClassification tokenizer = AutoTokenizer.from_pretrained("SemViQA/bc-erniem-viwikifc") model = ClaimModelForClassification.from_pretrained("SemViQA/bc-erniem-viwikifc", num_labels=2) claim = "Chiến tranh với Campuchia đã kết thúc trước khi Việt Nam thống nhất." evidence = "Sau khi thống nhất, Việt Nam tiếp tục gặp khó khăn do sự sụp đổ và tan rã của đồng minh Liên Xô cùng Khối phía Đông, các lệnh cấm vận của Hoa Kỳ, chiến tranh với Campuchia, biên giới giáp Trung Quốc và hậu quả của chính sách bao cấp sau nhiều năm áp dụng." inputs = tokenizer( claim, evidence, truncation="only_second", add_special_tokens=True, max_length=256, padding='max_length', return_attention_mask=True, return_token_type_ids=False, return_tensors='pt', ) labels = ["SUPPORTED", "REFUTED"] with torch.no_grad(): outputs = model(**inputs) logits = outputs["logits"] probabilities = F.softmax(logits, dim=1).squeeze() for i, (label, prob) in enumerate(zip(labels, probabilities.tolist()), start=1): print(f"{i}) {label} {prob:.4f}") # 1) SUPPORTED 0.0066 # 2) REFUTED 0.9934 ``` ## **Citation** If you use **SemViQA-BC** in your research, please cite: ```bibtex @misc{nguyen2025semviqasemanticquestionanswering, title={SemViQA: A Semantic Question Answering System for Vietnamese Information Fact-Checking}, author={Nam V. Nguyen and Dien X. Tran and Thanh T. Tran and Anh T. Hoang and Tai V. Duong and Di T. Le and Phuc-Lu Le}, year={2025}, eprint={2503.00955}, archivePrefix={arXiv}, primaryClass={cs.CL}, url={https://arxiv.org/abs/2503.00955}, } ``` 🔗 **Paper Link:** [SemViQA on arXiv](https://arxiv.org/abs/2503.00955) 🔗 **Source Code:** [GitHub - SemViQA](https://github.com/DAVID-NGUYEN-S16/SemViQA) ## About *Built by Dien X. Tran* [![LinkedIn](https://img.shields.io/badge/LinkedIn-Profile-blue?logo=linkedin)](https://www.linkedin.com/in/xndien2004/) For more details, visit the project repository. [![GitHub stars](https://img.shields.io/github/stars/DAVID-NGUYEN-S16/SemViQA?style=social)](https://github.com/DAVID-NGUYEN-S16/SemViQA)