This model is part of TextThreat - AI-Powered Detection of Digital Well-Being Risks with Cybersecurity Analytics, an MSc thesis proof-of-concept by Abdul Muksith Rizvi at the University of Doha for Science and Technology.
TextThreat detects digital well-being risk signals in social-media text and exports schema-valid cybersecurity-style events for SIEM analytics, with a Splunk-first hosted demo path.
The model can be used to generate per-label harm probabilities for research demonstrations and thesis artifact reproduction.
Out-of-Scope Use
This model is not intended for autonomous moderation, clinical risk assessment, law-enforcement decision-making, employment screening, or other high-stakes decisions. It should not be used as the only basis for action against a person.
Evaluation
The current uploaded artifact corresponds to the thesis proof-of-concept training run. Metrics are stored in the repository under experiments/results/distilbert_metrics.json.
Metric
Value
Micro F1
0.7363
Macro F1
0.4206
Macro ROC-AUC
0.9780
Macro PR-AUC
0.5324
Expected Calibration Error
0.0032
Eval loss
0.0471
Limitations
The model is trained for thesis proof-of-concept evidence, not as a production moderation service.
Toxicity labels come from the Jigsaw Toxic Comment task and may not cover all digital well-being risks.
Short, adversarial, sarcastic, reclaimed, or context-dependent text can be misclassified.
The live TextThreat demo applies a transparent safety lexical overlay for explicit threats, self-harm terms, and profanity so obvious demo-critical safety cases are not missed by the quick-trained model.
Fairness, calibration, and privacy experiments are represented in the companion repository and should be reviewed before deployment-style use.
Example
python
1import torch
2from transformers import AutoModelForSequenceClassification, AutoTokenizer
34model_id ="abdulmuksith/textthreat-distilbert-jigsaw"5tokenizer = AutoTokenizer.from_pretrained(model_id)6model = AutoModelForSequenceClassification.from_pretrained(model_id)78text ="I will kill you"9inputs = tokenizer(text, return_tensors="pt", truncation=True)10inputs ={k: v for k, v in inputs.items()if k in model.forward.__code__.co_varnames}1112with torch.no_grad():13 logits = model(**inputs).logits[0]1415scores = torch.sigmoid(logits)16print({model.config.id2label[i]:float(scores[i])for i inrange(len(scores))})
Citation
If referencing this model, cite the thesis project:
Rizvi, A. M. (2026). TextThreat: AI-Powered Detection of Digital Well-Being Risks with Cybersecurity Analytics. MSc thesis, University of Doha for Science and Technology.