A transformer-based multi-label text classification model that predicts the subjective psychological effects of psychoactive substances from user trip reports. Due to a smaller dataset, we achieved 55% accuracy.
- Input: I saw impossible geometry and felt a strong sense of ego death while colors melted around me.
- Predicted Effects: ['ego death', 'geometry', 'visual distortion', 'unity', 'time distortion']
- Source: PsychonautWiki
- Scraping: Custom Scrapy crawler
- Reports: 231 unique trip reports
- Labels: 19 subjective effect categories
- Split: 80/20 train-test split
- Cleaned raw text data and filtered infrequent effects.
- Converted effect labels into multi-hot encoded vectors.
- Label mapping stored in:
effect_types_encoded.json
- Model:
allenai/longformer-base-4096 - Frameworks: FastAI + Blurr (HuggingFace integration)
- Task: Multi-label classification
- Loss:
BCEWithLogitsLoss - Threshold: 0.2 for effect selection
All essential artifacts (model, dataloader, label mappings) are hosted here:
🔗 Google Drive Link
effect-classifier-stage-1.pkl– trained modeldls-effect-classifier.pkl– fastai DataLoaderseffect_types_encoded.json– label map