File size: 8,578 Bytes
e49c7a3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
fd7f088
e49c7a3
 
 
 
 
 
 
 
 
 
fd7f088
 
e49c7a3
 
 
 
 
 
 
 
 
 
 
 
fd7f088
e49c7a3
fd7f088
e49c7a3
fd7f088
e49c7a3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
fd7f088
e49c7a3
fd7f088
e49c7a3
 
 
fd7f088
e49c7a3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
fd7f088
 
 
 
 
e49c7a3
 
 
 
 
 
 
 
fd7f088
e49c7a3
fd7f088
 
 
e49c7a3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
fd7f088
 
 
e49c7a3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
fd7f088
e49c7a3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
fd7f088
e49c7a3
 
 
 
 
 
 
 
 
 
fd7f088
 
 
e49c7a3
 
 
 
 
 
 
 
 
 
 
fd7f088
 
 
e49c7a3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
fd7f088
e49c7a3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
language:
  - ar
license: apache-2.0
task_categories:
  - text-classification
task_ids:
  - sentiment-classification
  - hate-speech-detection
tags:
  - arabic
  - toxicity
  - hate-speech
  - cyberbullying
  - content-moderation
  - offensive-language
  - profanity
  - multi-dialect
  - arabic-nlp
pretty_name: "Hayā — Arabic Toxic Content Dataset"
size_categories:
  - 100K<n<1M
source_datasets:
  - original
  - L-HSAB
  - T-HSAB
  - OSACT4
  - OSACT5
  - MPOLD
  - Let-Mi
  - ArMIS
  - ArMI
  - ADHAR
  - LREC
dataset_info:
  features:
    - name: text
      dtype: string
    - name: label
      dtype: int64
    - name: source
      dtype: string
    - name: dialect
      dtype: string
  splits:
    - name: train
      num_examples: 798071
    - name: validation
      num_examples: 99759
    - name: test
      num_examples: 99759
configs:
  - config_name: default
    data_files:
      - split: train
        path: train.parquet
      - split: validation
        path: val.parquet
      - split: test
        path: test.parquet
---

# Hayā (حياء) — Arabic Toxic Content Dataset 🛡️

[![Model on HF](https://img.shields.io/badge/🤗_Model-Hayā-blue)](https://huggingface.co/youssefreda9/HAYAA)
[![GitHub](https://img.shields.io/badge/GitHub-HAYAA-black?logo=github)](https://github.com/youssefreda10/HAYAA)

## Dataset Description

**Hayā** is a large-scale, curated Arabic binary toxicity dataset built for training and evaluating Arabic content-moderation models. It was assembled by reviewing, collecting, standardizing, and merging **51 public Arabic hate-speech and abuse datasets** into a single clean corpus of **nearly 1 million examples**.

This is the dataset used to train the [Hayā model](https://huggingface.co/youssefreda9/HAYAA), a fine-tuned **UBC-NLP/MARBERTv2** classifier that achieved **97.84% accuracy** on the held-out test set.

### Key Features

- **~997K examples** of Arabic text (comments, posts, tweets) labeled as **Safe (0)** or **Toxic (1)**
- **Every major Arabic dialect**: Egyptian, Levantine, Gulf, Maghrebi, Iraqi, Sudanese, and MSA
- **Multi-platform**: Twitter, Facebook, YouTube, news comments, and more
- **Deduplicated**: Zero duplicate texts across the entire corpus
- **Conflict-resolved**: Overlapping texts from different sources resolved via majority vote
- **Leak-free splits**: Stratified 80/10/10 split with verified zero overlap between train, validation, and test

---

## Dataset Summary

| Property | Value |
|----------|-------|
| **Language** | Arabic (all major dialects) |
| **Task** | Binary text classification |
| **Labels** | `0` = Safe, `1` = Toxic |
| **Total Size** | 997,589 examples |
| **Train** | 798,071 (80%) |
| **Validation** | 99,759 (10%) |
| **Test** | 99,759 (10%) |
| **Sources** | 51 public datasets merged & standardized |
| **Format** | Parquet |

---

## What "Toxic" Covers

The **Toxic** label encompasses:

- 🤬 **Profanity & offensive language**
- 🔥 **Hate speech**
- 😡 **Insults, harassment & cyberbullying**
- 🚫 **Racism & religious hate**
- ⚠️ **Sexism & sexually explicit language**
- 🔤 **Morphologically complex and context-dependent expressions**
- 🕵️ **Intentional typos / obfuscation attempts**

---

## Dialects Covered

| Dialect Group | Varieties |
|---------------|-----------|
| **Egyptian** | Egyptian Arabic |
| **Levantine** | Syrian, Lebanese, Jordanian, Palestinian |
| **Gulf** | Saudi, Emirati, Kuwaiti, Bahraini, Omani, Qatari |
| **Maghrebi** | Moroccan, Algerian, Tunisian, Libyan |
| **Other** | Iraqi, Sudanese, Yemeni |
| **MSA** | Modern Standard Arabic |

---

## Data Fields

| Field | Type | Description |
|-------|------|-------------|
| `text` | `string` | The Arabic text (comment, tweet, or post) |
| `label` | `int` | `0` = Safe, `1` = Toxic |
| `source` | `string` | Origin dataset(s), pipe-separated if from multiple sources |
| `dialect` | `string` | Dialect(s), pipe-separated if from multiple sources |

---

## Data Splits

| Split | Examples | Purpose |
|-------|----------|---------|
| `train` | ~798K | Model training |
| `validation` | ~100K | Hyperparameter tuning & early stopping |
| `test` | ~100K | Final held-out evaluation |

All splits are **stratified by label** and verified for **zero text overlap** (no data leakage).

---

## Usage

```python
from datasets import load_dataset

dataset = load_dataset("youssefreda9/HAYAA")

# Access splits
train = dataset["train"]
val = dataset["validation"]
test = dataset["test"]

# Example
print(train[0])
# {'text': '...', 'label': 0, 'source': 'OSACT4', 'dialect': 'MSA'}
```

---

## Curation Process

### 1. Collection
Reviewed and collected **100+ public Arabic hate-speech and abuse datasets** from published research, shared tasks, and public repositories.

### 2. Standardization
Every source used a different labeling scheme (3-class, 5-class, multi-label, etc.). All were standardized into a single **binary** scheme:
- **Safe (0)**: Non-toxic, normal text
- **Toxic (1)**: Offensive, hateful, abusive, or harmful

### 3. Cleaning & Quality Control
- **Removed problematic datasets**: Sources with noisy labels, wrong task definitions, or exact duplicates of other sources were excluded
- **Fixed known mislabels**: Manual keyword-based correction of known systematic errors (e.g., SaudiCodeMixing safe-labeled profanity)
- **Filtered noise**: Removed long, machine-translated safe texts that didn't match real Arabic usage patterns

### 4. Conflict Resolution
Texts appearing in multiple sources with conflicting labels were resolved via **majority vote**.

### 5. Deduplication
Full text-level deduplication with dialect and source metadata merged (pipe-separated) for multi-source texts.

### 6. Splitting
**Stratified 80/10/10 split** (train/val/test) with seed=42, verified for zero leakage across all split pairs.

---

## Source Datasets

This corpus merges **51 standardized public Arabic datasets**, including:

| Dataset | Dialect | Size | Platform |
|---------|---------|------|----------|
| L-HSAB | Levantine | ~5.8K | Twitter |
| T-HSAB | Tunisian | ~6K | Facebook/YouTube |
| OSACT4 | MSA + mixed | ~10K | Twitter |
| OSACT5 | MSA + mixed | ~12.7K | Twitter |
| MPOLD | Multi-dialect | ~4K | Multi-platform |
| Let-Mi | Levantine | ~6.6K | Twitter |
| ArMI | MSA, Egyptian, Gulf, Levantine | ~9.8K | Twitter |
| ADHAR | Multi-dialect | ~4.3K | Twitter |
| LREC | MSA + dialects | ~15.9K | Twitter |
| *... and 42 more* | | | |

See the full [Dataset Registry](https://github.com/youssefreda10/HAYAA/tree/main/data) for detailed per-source documentation.

---

## Model Trained on This Dataset

The [Hayā model](https://huggingface.co/youssefreda9/HAYAA) — fine-tuned **UBC-NLP/MARBERTv2** — achieves:

| Metric | Score |
|--------|-------|
| Accuracy | **97.84%** |
| F1 (Toxic class) | **94.12%** |
| F1 (Safe class) | 98.45% |

> **Note:** Manual error analysis showed the model frequently *outperformed the original human annotations* — many counted "errors" were actually mislabels in the source data.

---

## Intended Use

- ✅ Training and evaluating Arabic toxicity / hate-speech classifiers
- ✅ Benchmarking Arabic NLP models on content moderation
- ✅ Research on multi-dialect Arabic text classification
- ✅ Building content-moderation pipelines for Arabic platforms

## Out-of-Scope Use

- ❌ Generating toxic or hateful content
- ❌ Surveillance or profiling of individuals
- ❌ Deployed decisions without human review

---

## Limitations & Biases

- **Platform bias**: The majority of the data comes from Twitter; other platforms (forums, messaging apps) are underrepresented.
- **Annotation noise**: Despite extensive cleaning, some label noise from original sources may remain.
- **Dialect imbalance**: Some dialects (e.g., Egyptian, MSA) are better represented than others (e.g., Sudanese, Yemeni).
- **Temporal bias**: Most data reflects Arabic social media discourse from 2018–2024; slang and evasion tactics evolve constantly.

---

## Citation

If you use this dataset, please cite:

```bibtex
@misc{hayaa2026,
  title={Hayā: A Large-Scale Multi-Dialect Arabic Toxicity Dataset},
  author={Youssef Reda},
  year={2026},
  url={https://huggingface.co/datasets/youssefreda9/HAYAA},
}
```

---

## License

This dataset is released under the [Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0).

---

## Contact

- **GitHub**: [youssefreda10/HAYAA](https://github.com/youssefreda10/HAYAA)
- **Model**: [youssefreda9/HAYAA](https://huggingface.co/youssefreda9/HAYAA)