File size: 5,116 Bytes
83b0f47
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
language:
- en
- ur
license: mit
tags:
- text-classification
- fake-news-detection
- misinformation
- xlm-roberta
- urdu
- english
- multilingual
datasets:
- liar
- GonzaloA/fake_news
- UrduFakeNews-AxToGrind
metrics:
- accuracy
- f1
model-index:
- name: sifta-fakenews-xlmr
  results:
  - task:
      type: text-classification
      name: Fake News Detection
    metrics:
    - type: accuracy
      value: 0.9696
    - type: f1
      value: 0.9695
      name: Macro F1
---

# SIFTA — Multilingual Fake News Detector (EN + UR)

**Model:** Fine-tuned `xlm-roberta-base` for binary fake news classification
**Languages:** English · Urdu (اردو)
**Labels:** `TRUE` (0) · `FAKE` (1)
**Student:** Muhammad Umair Khan · 2023F-BCET-010
**Institute:** Sir Syed University of Engineering and Technology, Karachi
**Project:** SIFTA — AI Misinformation Detection Platform (Final Year Project 2025–26)

---

## Model Description

This model fine-tunes [XLM-RoBERTa base](https://huggingface.co/xlm-roberta-base)
on a combined English + Urdu fake news corpus. It is the core ML component of
SIFTA — a multi-modal AI misinformation detection platform that also performs
voice clone detection, document forgery analysis, and live source verification.

The raw probability output is passed through SIFTA's Decision Engine alongside
live source verification signals to produce a five-class Trust Score verdict:
Verified Real · Likely Real · Uncertain · Unable to Verify · Likely Fake.

---

## Training Data

| Dataset | Samples (train) | Language |
|---|---|---|
| ISOT | 32482 | English |
| UrduFakeNews-AxToGrind | 8054 | Urdu |
| **Total** | **40536** | EN + UR |

### Dataset details

**Urdu — Ax-to-Grind UrduFakeNews Corpus**
- 10,106 news items from Pakistani social media and news outlets
- Binary labels: TRUE / FAKE
- Near-balanced: ~5,039 FAKE / ~4,997 TRUE
- Average length: 351 characters per item

**LIAR (Wang, 2017)**
- 12,836 political statements from PolitiFact
- 6-way labels mapped to binary:
  - pants-fire / false / barely-true → FAKE
  - half-true / mostly-true / true → TRUE

**ISOT Fake News Dataset (University of Victoria)**
- ~44,000 real/fake news articles
- Real: Reuters. Fake: unreliable sources. Already binary labelled.

---

## Training Configuration

| Parameter | Value |
|---|---|
| Base model | xlm-roberta-base |
| Max token length | 256 |
| Epochs | 5 |
| Batch size | 16 x 2 grad accum = 32 effective |
| Learning rate | 2e-05 |
| LR schedule | Cosine with 10% linear warmup |
| Weight decay | 0.01 |
| Dropout | 0.1 |
| Loss | CrossEntropyLoss with inverse-frequency class weights |
| Early stopping | Patience 3 on val macro-F1 |
| Mixed precision | fp16 on T4 GPU |
| Random seed | 42 |

---

## Evaluation Results

### Overall (held-out test set — 10% stratified)

| Metric | Score |
|---|---|
| Accuracy | 0.9696 |
| Macro F1 | 0.9695 |
| TRUE (class 0) F1 | 0.9676 |
| FAKE (class 1) F1 | 0.9713 |

### Per-language macro-F1

| Language | Macro F1 |
|---|---|
| EN | 0.9854 |
| UR | 0.9053 |

### Full classification report

```
              precision    recall  f1-score   support

        TRUE     0.9632    0.9721    0.9676      2369
        FAKE     0.9753    0.9674    0.9713      2698

    accuracy                         0.9696      5067
   macro avg     0.9693    0.9698    0.9695      5067
weighted avg     0.9697    0.9696    0.9696      5067

```
### Confusion Matrix

![Confusion Matrix](confusion_matrix.png)

| | Predicted TRUE | Predicted FAKE |
|---|---|---|
| **Actual TRUE** | 2,303 (TN) | 66 (FP) |
| **Actual FAKE** | 88 (FN) | 2,610 (TP) |

- **TRUE recall:** 97.2%
- **FAKE recall:** 96.7%

---

## Usage

### HuggingFace Inference API (used by SIFTA backend)

```python
import httpx

API_URL = "https://api-inference.huggingface.co/models/zodumair/sifta-fakenews-xlmr"
headers = {"Authorization": "Bearer hf_your_token_here"}

def classify(text):
    return httpx.post(API_URL, headers=headers, json={'inputs': text}).json()

print(classify("Scientists confirm new vaccine is 77% effective."))
print(classify("حکومت نے خفیہ طور پر ملک کا سارا سونا بیرون ملک بھیج دیا"))
```
### Local inference

```python
from transformers import pipeline

classifier = pipeline("text-classification", model="zodumair/sifta-fakenews-xlmr")
print(classifier("SHOCKING: Scientists hiding cancer cure from the public."))
# [{'label': 'FAKE', 'score': 0.93}]
```
---

## Limitations

- Optimised for headlines and short excerpts under 256 tokens
- Urdu performance is lower than English due to smaller Urdu training set
- Satire and opinion pieces may be misclassified
- Use alongside source verification — not as a standalone decision tool

---

## Citation

```
@misc{sifta2026,
  author      = {Muhammad Umair Khan},
  title       = {SIFTA: AI Misinformation Detection Platform},
  year        = {2026},
  institution = {Sir Syed University of Engineering and Technology, Karachi},
  note        = {Final Year Project, Batch 2023F}
}
```
---
*SIFTA FYP SSUET Karachi · Batch 2023F · 2023F-BCET-010*