meta data block is added
Browse files
README.md
CHANGED
|
@@ -1,63 +1,76 @@
|
|
| 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 |
-
from
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language: en
|
| 3 |
+
tags:
|
| 4 |
+
- text-classification
|
| 5 |
+
- abusive-language
|
| 6 |
+
- hate-speech
|
| 7 |
+
- toxicity
|
| 8 |
+
- cyberviolence
|
| 9 |
+
- abusive-language-detection
|
| 10 |
+
- BERT
|
| 11 |
+
license: mit
|
| 12 |
+
---
|
| 13 |
+
|
| 14 |
+
# AbuseBERT
|
| 15 |
+
|
| 16 |
+
## Model Description
|
| 17 |
+
|
| 18 |
+
**AbuseBERT** is a **BERT-based classification model** fine-tuned for **abusive language detection**, optimized for **cross-dataset generalization**.
|
| 19 |
+
|
| 20 |
+
> Abusive language detection models often suffer from poor generalization due to **sampling and lexical biases** in individual datasets. Our approach addresses this by integrating **ten publicly available abusive language datasets**, harmonizing labels and preprocessing textual samples to create a **broader and more representative training distribution**.
|
| 21 |
+
|
| 22 |
+
**Key Findings:**
|
| 23 |
+
- Individual dataset models: average F1 = **0.60**
|
| 24 |
+
- Integrated model: F1 = **0.84**
|
| 25 |
+
- Dataset contribution to performance improvements correlates with **lexical diversity (0.71 correlation)**
|
| 26 |
+
- Integration exposes models to diverse abuse patterns, enhancing **real-world generalization**
|
| 27 |
+
|
| 28 |
+
---
|
| 29 |
+
|
| 30 |
+
## Conclusion / Takeaways
|
| 31 |
+
|
| 32 |
+
- No single dataset captures the full spectrum of abusive language; each dataset reflects a **limited slice** of the problem space.
|
| 33 |
+
- Systematically integrating ten heterogeneous datasets significantly improves classification performance on a **held-out benchmark**.
|
| 34 |
+
- Lexically dissimilar datasets contribute more to **enhancing generalization**.
|
| 35 |
+
- The integrated model demonstrates superior **cross-dataset performance** compared to models trained on individual datasets.
|
| 36 |
+
|
| 37 |
+
---
|
| 38 |
+
|
| 39 |
+
## Paper Reference
|
| 40 |
+
|
| 41 |
+
Samaneh Hosseini Moghaddam, Kelly Lyons, Frank Rudzicz, Cheryl Regehr, Vivek Goel, Kaitlyn Regehr,
|
| 42 |
+
“**Enhancing machine learning in abusive language detection with dataset aggregation**,” in *Proc. 35th IEEE Int. Conf. Collaborative Advances in Software Computing (CASC)*, 2025.
|
| 43 |
+
|
| 44 |
+
---
|
| 45 |
+
|
| 46 |
+
## Intended Use
|
| 47 |
+
|
| 48 |
+
**Recommended:**
|
| 49 |
+
- Detecting abusive language in text from social media or online platforms
|
| 50 |
+
- Research on bias mitigation and cross-dataset generalization
|
| 51 |
+
- Supporting safe and inclusive online environments
|
| 52 |
+
|
| 53 |
+
**Not Recommended:**
|
| 54 |
+
- Fully automated moderation without human oversight
|
| 55 |
+
- High-stakes legal or policy decisions
|
| 56 |
+
|
| 57 |
+
---
|
| 58 |
+
|
| 59 |
+
## Usage Example
|
| 60 |
+
|
| 61 |
+
```python
|
| 62 |
+
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
| 63 |
+
import torch
|
| 64 |
+
|
| 65 |
+
# Load model and tokenizer
|
| 66 |
+
tokenizer = AutoTokenizer.from_pretrained("Samanehmoghaddam/AbuseBERT")
|
| 67 |
+
model = AutoModelForSequenceClassification.from_pretrained("Samanehmoghaddam/AbuseBERT")
|
| 68 |
+
|
| 69 |
+
# Sample input
|
| 70 |
+
text = "Your example text here."
|
| 71 |
+
inputs = tokenizer(text, return_tensors="pt")
|
| 72 |
+
outputs = model(**inputs)
|
| 73 |
+
|
| 74 |
+
# Predicted label
|
| 75 |
+
predicted_label = torch.argmax(outputs.logits, dim=1).item()
|
| 76 |
+
print(f"Predicted label: {predicted_label}")
|