摘要
Depression and bipolar disorder (BD) are mental disorders that are often misdiagnosed as each other because their symptoms often overlap. Depression is characterized by prolonged negative emotion, which is persistent feelings of sadness. In contrast, BD is characterized by repeated extreme changes of emotions, consisting of manic (very happy) and depression (very sad) episodes. Because of overlapping symptoms, changes of emotions indicating depression or BD are difficult to recognize from individual posts. We propose two deep learning models to detect depression and BD from user posts, considering individual posts and multiple posts. A novel method to extract emotion features is designed by fine-tuning a transformer model to extract the intensity of emotions of the posts. Text features are extracted using word embedding models that have been fine tuned on mental health data, and we further consider topic features by using a topic modeling method. Multiple posts are considered by grouping them based on a time interval between the posts. The features of each group are concatenated, input into a convolution neural network (CNN), and go through a long short-term memory (LSTM). The attention mechanism is used to pay attention to important groups. The most important groups can be observed further to explain why the model classified depression and BD users. Our proposed model outperforms other models, achieving an F1-Score of 0.9589. Based on our experiment, the changes of emotions within four days are necessary for distinguishing depression and BD, which aligns with considerations in diagnosing symptoms of depression and BD.