File size: 10,032 Bytes
1ecaff8
 
 
 
07e5f50
 
1ecaff8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b7ecc41
1ecaff8
 
 
 
0198772
4eca049
 
 
 
0198772
 
1ecaff8
 
0198772
1ecaff8
 
0198772
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1ecaff8
 
b7ecc41
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1ecaff8
 
 
 
 
742d163
 
 
1ecaff8
 
 
 
742d163
1ecaff8
 
 
 
 
 
 
 
 
 
 
 
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
---
language:
- vi
library_name: transformers
license: mit
pipeline_tag: text-classification
tags:
- SemViQA
- three-class-classification
- fact-checking
---

# SemViQA-TC: Vietnamese Three-class Classification for Claim Verification  

## Model Description  

**SemViQA-TC** is one of the key components of the **SemViQA** system, designed for **three-class classification** in Vietnamese fact-checking. This model classifies a given claim into one of three categories: **SUPPORTED**, **REFUTED**, or **NOT ENOUGH INFORMATION (NEI)** based on retrieved evidence.

### **Model Information**  
- **Developed by:** [SemViQA Research Team](https://huggingface.co/SemViQA)  
- **Fine-tuned model:** [XLM-R](https://huggingface.co/FacebookAI/xlm-roberta-large)  
- **Supported Language:** Vietnamese  
- **Task:** Three-Class Classification (Fact Verification)  
- **Dataset:** [ISE-DSC01](https://codalab.lisn.upsaclay.fr/competitions/15497)  

SemViQA-TC serves as the **first step in the two-step classification (TVC) process** of the SemViQA system. It initially categorizes claims into three classes: **SUPPORTED, REFUTED, or NEI**. For claims classified as **SUPPORTED** or **REFUTED**, a secondary **binary classification model (SemViQA-BC)** further refines the prediction. This hierarchical classification strategy enhances the accuracy of fact verification.

## 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/tc-xlmr-isedsc01")
model = ClaimModelForClassification.from_pretrained("SemViQA/tc-xlmr-isedsc01")
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 = ["NEI", "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) NEI 0.0000
# 2) SUPPORTED 0.0004
# 3) REFUTED 0.9996
```

## **Evaluation Results**

SemViQA-TC achieved impressive results on the test set, demonstrating accurate and efficient classification capabilities. The detailed evaluation of SemViQA-TC is presented in the table below.

<table> 
  <thead>
    <tr>
      <th colspan="2">Method</th>
      <th colspan="4">ISE-DSC01</th>
    </tr>
    <tr>
      <th>ER</th>
      <th>VC</th>
      <th>Strict Acc</th>
      <th>VC Acc</th>
      <th>ER Acc</th>
      <th>Time (s)</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td rowspan="3">TF-IDF</td>
      <td>InfoXLM<sub>large</sub></td>
      <td>73.59</td>
      <td>78.08</td>
      <td>76.61</td>
      <td>378</td>
    </tr>
    <tr>
      <td>XLM-R<sub>large</sub></td>
      <td>75.61</td>
      <td>80.50</td>
      <td>78.58</td>
      <td>366</td>
    </tr>
    <tr>
      <td>Ernie-M<sub>large</sub></td>
      <td>78.19</td>
      <td>81.69</td>
      <td>80.65</td>
      <td>403</td>
    </tr>
    <tr>
      <td rowspan="3">BM25</td>
      <td>InfoXLM<sub>large</sub></td>
      <td>72.09</td>
      <td>77.37</td>
      <td>75.04</td>
      <td>320</td>
    </tr>
    <tr>
      <td>XLM-R<sub>large</sub></td>
      <td>73.94</td>
      <td>79.37</td>
      <td>76.95</td>
      <td>333</td>
    </tr>
    <tr>
      <td>Ernie-M<sub>large</sub></td>
      <td>76.58</td>
      <td>80.76</td>
      <td>79.02</td>
      <td>381</td>
    </tr>
    <tr>
      <td rowspan="3">SBert</td>
      <td>InfoXLM<sub>large</sub></td>
      <td>71.20</td>
      <td>76.59</td>
      <td>74.15</td>
      <td>915</td>
    </tr>
    <tr>
      <td>XLM-R<sub>large</sub></td>
      <td>72.85</td>
      <td>78.78</td>
      <td>75.89</td>
      <td>835</td>
    </tr>
    <tr>
      <td>Ernie-M<sub>large</sub></td>
      <td>75.46</td>
      <td>79.89</td>
      <td>77.91</td>
      <td>920</td>
    </tr>
    <tr>
      <th colspan="1">QA-based approaches</th>
      <th colspan="1">VC</th>
      <th colspan="4"></th>
    </tr>
    <tr>
      <td rowspan="3">ViMRC<sub>large</sub></td>
      <td>InfoXLM<sub>large</sub></td>
      <td>54.36</td>
      <td>64.14</td>
      <td>56.84</td>
      <td>9798</td>
    </tr>
    <tr>
      <td>XLM-R<sub>large</sub></td>
      <td>53.98</td>
      <td>66.70</td>
      <td>57.77</td>
      <td>9809</td>
    </tr>
    <tr>
      <td>Ernie-M<sub>large</sub></td>
      <td>56.62</td>
      <td>62.19</td>
      <td>58.91</td>
      <td>9833</td>
    </tr>
    <tr>
      <td rowspan="3">InfoXLM<sub>large</sub></td>
      <td>InfoXLM<sub>large</sub></td>
      <td>53.50</td>
      <td>63.83</td>
      <td>56.17</td>
      <td>10057</td>
    </tr>
    <tr>
      <td>XLM-R<sub>large</sub></td>
      <td>53.32</td>
      <td>66.70</td>
      <td>57.25</td>
      <td>10066</td>
    </tr>
    <tr>
      <td>Ernie-M<sub>large</sub></td>
      <td>56.34</td>
      <td>62.36</td>
      <td>58.69</td>
      <td>10078</td>
    </tr>
    <tr>
      <th colspan="2">LLM</th> 
      <th colspan="4"></th>
    </tr>
    <tr>
      <td colspan="2">Qwen2.5-1.5B-Instruct</td>
      <td>59.23</td>
      <td>66.68</td>
      <td>65.51</td>
      <td>19780</td>
    </tr>
    <tr>
      <td colspan="2">Qwen2.5-3B-Instruct</td>
      <td>60.87</td>
      <td>66.92</td>
      <td>66.10</td>
      <td>31284</td>
    </tr>
    <tr>
      <th colspan="1">LLM</th>
      <th colspan="1">VC</th>
      <th colspan="4"></th>
    </tr>
    <tr>
      <td rowspan="3">Qwen2.5-1.5B-Instruct</td>
      <td>InfoXLM<sub>large</sub></td>
      <td>64.40</td>
      <td>68.37</td>
      <td>66.49</td>
      <td>19970</td>
    </tr>
    <tr>
      <td>XLM-R<sub>large</sub></td>
      <td>64.66</td>
      <td>69.63</td>
      <td>66.72</td>
      <td>19976</td>
    </tr>
    <tr>
      <td>Ernie-M<sub>large</sub></td>
      <td>65.70</td>
      <td>68.37</td>
      <td>67.33</td>
      <td>20003</td>
    </tr>
    <tr>
      <td rowspan="3">Qwen2.5-3B-Instruct</td>
      <td>InfoXLM<sub>large</sub></td>
      <td>65.72</td>
      <td>69.66</td>
      <td>67.51</td>
      <td>31477</td>
    </tr>
    <tr>
      <td>XLM-R<sub>large</sub></td>
      <td>66.12</td>
      <td>70.44</td>
      <td>67.83</td>
      <td>31483</td>
    </tr>
    <tr>
      <td>Ernie-M<sub>large</sub></td>
      <td>67.48</td>
      <td>70.77</td>
      <td>68.75</td>
      <td>31512</td>
    </tr>
    <tr>
      <th colspan="1">SER Faster (ours)</th>
      <th colspan="1">TVC (ours)</th>
      <th colspan="4"></th>
    </tr>
    <tr>
      <td>TF-IDF + ViMRC<sub>large</sub></td>
      <td>Ernie-M<sub>large</sub></td>
      <td style="color:blue">78.32</td>
      <td style="color:blue">81.91</td>
      <td style="color:blue">80.26</td>
      <td style="color:blue">995</td>
    </tr>
    <tr>
      <td>TF-IDF + InfoXLM<sub>large</sub></td>
      <td>Ernie-M<sub>large</sub></td>
      <td style="color:blue">78.37</td>
      <td style="color:blue">81.91</td>
      <td style="color:blue">80.32</td>
      <td style="color:blue">925</td>
    </tr>
    <tr>
      <th colspan="1">SER (ours)</th>
      <th colspan="1">TVC (ours)</th>
      <th colspan="4"></th>
    </tr>
    <tr>
      <td rowspan="3">TF-IDF + ViMRC<sub>large</sub></td>
      <td>InfoXLM<sub>large</sub></td>
      <td>75.13</td>
      <td>79.54</td>
      <td>76.87</td>
      <td>5191</td>
    </tr>
    <tr>
      <td>XLM-R<sub>large</sub></td>
      <td>76.71</td>
      <td>81.65</td>
      <td>78.91</td>
      <td>5219</td>
    </tr>
    <tr>
      <td>Ernie-M<sub>large</sub></td>
      <td><strong>78.97</strong></td>
      <td><strong>82.54</strong></td>
      <td><strong>80.91</strong></td>
      <td>5225</td>
    </tr>
    <tr>
      <td rowspan="3">TF-IDF + InfoXLM<sub>large</sub></td>
      <td>InfoXLM<sub>large</sub></td>
      <td>75.13</td>
      <td>79.60</td>
      <td>76.87</td>
      <td>5175</td>
    </tr>
    <tr>
      <td>XLM-R<sub>large</sub></td>
      <td>76.74</td>
      <td>81.71</td>
      <td>78.95</td>
      <td>5200</td>
    </tr>
    <tr>
      <td>Ernie-M<sub>large</sub></td>
      <td><strong>78.97</strong></td>
      <td>82.49</td>
      <td><strong>80.91</strong></td>
      <td>5297</td>
    </tr>
  </tbody>
</table>

## **Citation**

If you use **SemViQA-TC** in your research, please cite:

```bibtex
@misc{tran2025semviqasemanticquestionanswering,
      title={SemViQA: A Semantic Question Answering System for Vietnamese Information Fact-Checking}, 
      author={Dien X. Tran and Nam V. Nguyen 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)