Text Classification
Transformers
Safetensors
Turkish
bert
turkish
content-moderation
multi-label-classification
safety
moderation
nlp
Eval Results (legacy)
text-embeddings-inference
Instructions to use hayatiali/turkish-safety with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hayatiali/turkish-safety with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="hayatiali/turkish-safety")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("hayatiali/turkish-safety") model = AutoModelForSequenceClassification.from_pretrained("hayatiali/turkish-safety", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update model card with detailed limitations and known issues
Browse files
README.md
CHANGED
|
@@ -331,23 +331,57 @@ def predict_batch(texts: list, batch_size: int = 32) -> list:
|
|
| 331 |
|
| 332 |
---
|
| 333 |
|
| 334 |
-
## Limitations
|
| 335 |
|
| 336 |
-
###
|
| 337 |
|
| 338 |
-
|
| 339 |
-
|
| 340 |
-
|
| 341 |
-
|
| 342 |
-
|
|
| 343 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 344 |
|
| 345 |
### Not Suitable For
|
| 346 |
|
| 347 |
- Languages other than Turkish
|
| 348 |
-
- Adult content moderation (different domain)
|
| 349 |
-
- Sole decision-making without human review
|
| 350 |
- Legal evidence or court proceedings
|
|
|
|
|
|
|
| 351 |
|
| 352 |
---
|
| 353 |
|
|
|
|
| 331 |
|
| 332 |
---
|
| 333 |
|
| 334 |
+
## Limitations & Known Issues
|
| 335 |
|
| 336 |
+
### ⚠️ Evaluation Limitations
|
| 337 |
|
| 338 |
+
**Note**: Two separate evaluation sets exist:
|
| 339 |
+
- **Automated Test Set**: 17,033 samples from test.csv → Macro F1: 0.9165, MCC: 0.9045
|
| 340 |
+
- **Manual Edge Case Test**: 22 hand-picked samples → 86.4% accuracy (19/22 correct)
|
| 341 |
+
|
| 342 |
+
| Limitation | Details | Impact |
|
| 343 |
+
|------------|---------|--------|
|
| 344 |
+
| **Small Manual Test Set** | Edge case validation on only 22 samples (86.4%) | Manual test not statistically significant; automated metrics (17K samples) more reliable |
|
| 345 |
+
| **No Per-Class Metrics** | Only Macro F1 and MCC reported for 17K test set | Cannot assess individual category performance (e.g., SELF_HARM Precision/Recall vs SAFE) |
|
| 346 |
+
| **No Confusion Matrix** | Category confusion patterns not documented | Unclear which categories are most confused beyond GROOMING/SEXUAL boundary |
|
| 347 |
+
| **No PR/ROC Curves** | Precision-Recall and ROC analysis not performed | Optimal threshold selection methodology not documented |
|
| 348 |
+
| **No Calibration Analysis** | Model confidence calibration not tested | Unknown if 0.7 confidence truly represents 70% probability |
|
| 349 |
+
|
| 350 |
+
### ⚠️ Architectural Limitations
|
| 351 |
+
|
| 352 |
+
| Limitation | Details | Impact |
|
| 353 |
+
|------------|---------|--------|
|
| 354 |
+
| **Short Context Window** | Max sequence length: 64 tokens | Long messages may lose critical information; truncation may remove key context |
|
| 355 |
+
| **Single-Turn Only** | No conversation history analysis | GROOMING patterns often emerge across multiple messages ("Kaç yaşındasın?", "Nerelisin?", "Fotoğraf atar mısın?" may each appear SAFE individually) |
|
| 356 |
+
| **No Temporal Patterns** | No escalation detection capability | Cannot detect behavior changes over time; user history not considered |
|
| 357 |
+
| **Static Analysis** | Each message analyzed independently | Contextual red flags from message sequences not captured |
|
| 358 |
+
|
| 359 |
+
### ⚠️ Data & Coverage Limitations
|
| 360 |
+
|
| 361 |
+
| Limitation | Details | Impact |
|
| 362 |
+
|------------|---------|--------|
|
| 363 |
+
| **Dialect/Slang Gaps** | Regional dialects and internet slang underrepresented | Performance may degrade on: "napıon", "nbr", "slm", "mrb", regional variations |
|
| 364 |
+
| **No Adversarial Testing** | Evasion techniques not systematically tested | Unknown robustness against: "S 3 x" instead of "sex", character substitution, unicode tricks |
|
| 365 |
+
| **Synthetic Data Bias** | 97.5% of training data is LLM-generated | May not capture real-world linguistic patterns; potential distribution shift |
|
| 366 |
+
| **Spelling Error Tolerance** | Not explicitly tested | Common typos and intentional misspellings may bypass detection |
|
| 367 |
+
|
| 368 |
+
### ⚠️ Production Deployment Considerations
|
| 369 |
+
|
| 370 |
+
| Consideration | Details | Recommendation |
|
| 371 |
+
|---------------|---------|----------------|
|
| 372 |
+
| **Threshold Selection** | Current thresholds (0.3, 0.5, 0.75) are heuristic | Perform PR curve analysis for your specific use case; adjust based on FP/FN tolerance |
|
| 373 |
+
| **Confidence Calibration** | Model may be over/under-confident | Consider temperature scaling or Platt calibration before production |
|
| 374 |
+
| **Category Boundaries** | GROOMING ↔ SEXUAL boundary is known issue | Review flagged content in these categories; implement human review for edge cases |
|
| 375 |
+
| **Real-Time Context** | No session-level analysis | Consider implementing sliding window or conversation aggregation layer |
|
| 376 |
|
| 377 |
### Not Suitable For
|
| 378 |
|
| 379 |
- Languages other than Turkish
|
| 380 |
+
- Adult content moderation (requires different domain expertise)
|
| 381 |
+
- Sole decision-making without human review for high-stakes situations
|
| 382 |
- Legal evidence or court proceedings
|
| 383 |
+
- Detection of sophisticated, multi-turn grooming attempts without additional context layer
|
| 384 |
+
- Highly informal/slang-heavy communications without additional preprocessing
|
| 385 |
|
| 386 |
---
|
| 387 |
|