Hybrid AfriBERTa for Swahili/Sheng Depression Detection
This model is a custom hybrid neural network designed to detect depressive language patterns in code-mixed Swahili and Sheng social media posts, specifically among Kenyan university students.
Model Details
- Developed by: Peter Nabibia (Meru University of Science and Technology)
- Supervisors: Dr. Amos Chege Kirongo, Dr. Mary Mwadulo. (Meru University of Science and Technology)
- Model type: Hybrid Transformer + MLP (Late Fusion)
- Language(s): Swahili, Sheng (Code-mixed)
- License: Apache 2.0
Architecture
The model fuses two distinct text analysis techniques:
- Emotion Analysis: A pre-trained AfriBERTa transformer extracts a 768-dimensional
[CLS]token embedding to capture holistic contextual semantics. - Linguistic Feature Analysis: An MLP processes 4 engineered psycholinguistic features (First-person pronouns, negative words, absolutist words, lexical diversity) into a 32-dimensional vector.
These branches are concatenated (800 dimensions) and passed through a fully connected layer with Softmax for binary classification.
Performance
Evaluated on a balanced held-out test set of 353 Swahili/Sheng tweets:
- Accuracy: 96.88%
- Precision: 95.73%
- Recall: 99.02%
- F1-Score: 97.35%
- AUROC: 99.30%
Intended Use & Limitations
Clinical Disclaimer: This model is a research prototype. It is NOT a clinical diagnostic tool. Predictions should not be used for real-time screening, triage, or medical diagnosis. Any real-world deployment must be accompanied by human oversight from licensed mental health professionals.
Training Data
The model was trained on the Swahili/Sheng Depression Corpus (3,522 tweets).