This is the official implementation of "CURE: Context and Uncertainty-Aware Mental Disorder Detection" accepted in The 2024 Conference on Empirical Methods in Natural Language Processing (EMNLP, 2024). The paper is available at Here.
🎉 September 2024, Paper accepted at EMNLP 2024 🎉
- torch==2.3.1
- transformers==4.41.2
Our dataset KoMOS (Korean Mental Health Dataset with Mental Disorder and Symptoms labels) is publicly available in this repository. If you use this dataset, please make sure to cite our work.
In our dataset, each data instance consists of a pair: a question from a user discussing their mental health problem and an answer from a psychiatrist providing a diagnosis.
CURE consists of three main components:
- Feature Extraction
- Model Prediction
- Uncertainty-aware Decision Fusion
For convenience, we provide pre-extracted features in the dataset. However, if you want to extract features from scratch, follow these steps:
Navigate to the symptom identification directory and run:
bash run_symptom_identification.shThis will generate symptom vectors and uncertainty scores for each fold.
Navigate to disease_detection/gpt-api and execute:
bash gpt-api/run_all_factors.shNote: Modify file paths as needed for your environment.
To train and save checkpoints for the five sub-models, run the following scripts:
# Sub-models training
bash scripts/sub-models/run_disease_detection_bert.sh
bash scripts/sub-models/run_disease_detection_bert_with_context.sh
bash scripts/sub-models/run_disease_detection_symp.sh
bash scripts/sub-models/run_disease_detection_symp_with_context.shGPT results are included in the dataset for convenience. If you want to run GPT inference yourself, refer to disease_detection/gpt-api/mental_disorder_detection.py.
Train the final model by running:
bash scripts/run_disease_detection_cure.sh@inproceedings{
kang2024cure,
title={CURE: Context-and Uncertainty-Aware Mental Disorder Detection},
author={Kang, Migyeong and Choi, Goun and Jeon, Hyolim and An, Ji Hyun and Choi, Daejin and Han, Jinyoung},
booktitle={Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing},
pages={17924--17940},
year={2024}
}
