Samanehmoghaddam commited on
Commit
41974cd
·
verified ·
1 Parent(s): fadde14

meta data block is added

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