◆ QUEST LOG / STRESS DETECTION
Stress detection from social media text
Before I could benchmark the models, I had to benchmark the dataset.
01The dataset, inspected before trusted
This case study uses the public benchmark from “Stress Detection from Social Media Articles: New Dataset Benchmark and Analytical Study” (IEEE WCCI 2022, IJCNN track), which pairs a Reddit corpus with a Twitter corpus that the authors filtered into “advertisement” and “non-advertisement” splits.
Reading samples before training turned out to be the most valuable hour of the project: the “non-advertisement” Twitter split was still full of ads. Training a stress classifier on promotional tweets teaches it to detect marketing, not stress, so I dropped the Twitter data entirely and ran the study on the Reddit subset, where the labels held up.
02The benchmark
On the Reddit data I fine-tuned and compared three transformers: BERT, RoBERTa, and DistilBERT, head-to-head under the same training setup. RoBERTa won at 97.2% accuracy and 0.997 ROC-AUC, with BERT close behind and DistilBERT trading a little accuracy for a lot of speed.
Read the full report (PDF) ↗
03The part nobody benchmarks: cost
The interesting decision isn’t “which model is most accurate” — it’s whether the last 1% of accuracy is worth 2× the inference cost. DistilBERT runs roughly twice as fast as RoBERTa; for a screening tool processing high message volume, that can decide the deployment. I measured per-class F1, confusion matrices, and inference time side by side so the trade-off is a documented decision, not a default.
04What came next
This study was the warm-up for my master’s thesis, which asks a harder question: detecting workplace stress in Indonesian text, where the linguistic signals differ from the English data most published models are trained on. The thesis (a hybrid of transformers and psycholinguistic features, with SHAP interpretability) is in progress and unpublished — the numbers on this page are from the benchmark case study above, not from the thesis.