DASentimental: Detecting Depression, Anxiety, and Stress in Texts via Emotional Recall, Cognitive Networks, and Machine Learning
Abstract
:1. Introduction
Literature Review: Cognitive Data Science, Mental Well-Being and Issues of Affect Scales
2. Research Aims
3. Methods
3.1. Datasets: Emotional Recall Data, Free Associations, Suicide Notes, and Valence–Arousal Norms
3.2. Machine Learning Regression Analysis
- Data cleaning and vectorial representation of regressor (features) and response (DAS levels) variables;
- Training, cross-validation, and selection of the best-performing regression model for estimating DAS levels from ERT data;
- Estimating the DAS levels of suicide notes by parsing the sequences of emotional words in each letter;
- Validating the labelling predicted by DASentimental through independent affective norms [10].
3.3. Data Cleaning and Vectorial Representation of Regressor Variables
3.4. Embedding Recall Data in Cognitive Networks of Free Associations
- The coverage performed over the whole walk [36]—that is, the total number of free associations traversed when navigating across a shortest path from node to , then from to , and so on. This coverage equals the sum or the total of all the network distances between adjacent words in a given recall;
- The graph distance entropy [45] of the whole walk , computed as the Shannon entropy for the occurrences of paths of any length within ;
- The total network distance between all nodes in a walk/recall and the target word “depression”. Similarly, we also considered () as the sum of distances between recalled words and “stress” (“anxiety”);
- The total network distance between all nodes in a walk/recall and the target emotional state “happy”. Similarly, we also considered () as the sum of distances between recalled words and the target emotion “sad” (“fear”).
3.5. Machine Learning Approaches
3.6. Model Training
3.7. Application of DASentimental to Text
Algorithm 1: Semantic parser identifying emotional words from text that can be mapped onto the emotional lexicon of DASentimental. |
Input: Text from Suicide Note Output: Vector Representation of emotional content, selected words 1for each sentence in suicide note do 2 for each word in sentence do 3 if word is negative: 4 isNeg = True 5 if word not in stopwords and word.pos in [‘NOUN’,‘ADJ’,‘ADV’,‘VERB’] 6 if isNeg True: 7 find similar words to the current word antonym in ERT words 8 if max similarity ≥= 0.5: 9 Add most similar word to selected words and update vector 10 isNeg=False 11 else: 12 find similar words to the current word in ERT words 13 if max similarity ≥= 0.5: 14 Add most similar word to selected words and update vector 15 end for 16end for |
3.8. Handling Negations in Texts
3.9. Psycholinguistic Validation of DASentimental for Text Analysis
4. Results
4.1. Semantic Distances Reflect Patterns of Depression, Anxiety, and Stress
4.2. Performance of Different Machine Learning Algorithms
4.3. Embedding BOW in Semantic Memory Significantly Boosts Regression Performance
4.4. Comparison of Model Performance Based on Cognitive Network Features
4.5. Analysis of Suicide Notes
5. Discussion
Limitations and Future Research
6. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Lovibond, P.F.; Lovibond, S.H. The structure of negative emotional states: Comparison of the Depression Anxiety Stress Scales (DASS) with the Beck Depression and Anxiety Inventories. Behav. Res. Ther. 1995, 33, 335–343. [Google Scholar] [CrossRef]
- Russell, J.A.; Barrett, L.F. Core affect, prototypical emotional episodes, and other things called emotion: Dissecting the elephant. J. Personal. Soc. Psychol. 1999, 76, 805. [Google Scholar] [CrossRef]
- O’Driscoll, C.; Buckman, J.E.; Fried, E.I.; Saunders, R.; Cohen, Z.D.; Ambler, G.; DeRubeis, R.J.; Gilbody, S.; Hollon, S.D.; Kendrick, T.; et al. The importance of transdiagnostic symptom level assessment to understanding prognosis for depressed adults: Analysis of data from six randomised control trials. BMC Med. 2021, 19, 1–14. [Google Scholar] [CrossRef] [PubMed]
- Akin, A.; Çetın, B. The Depression Anxiety and Stress Scale (DASS): The study of Validity and Reliability. Educ. Sci. Theory Pract. 2007, 7, 260–268. [Google Scholar]
- Conejero, I.; Olié, E.; Calati, R.; Ducasse, D.; Courtet, P. Psychological pain, depression, and suicide: Recent evidences and future directions. Curr. Psychiatry Rep. 2018, 20, 1–9. [Google Scholar] [CrossRef]
- Abend, R.; Bajaj, M.A.; Coppersmith, D.D.; Kircanski, K.; Haller, S.P.; Cardinale, E.M.; Salum, G.A.; Wiers, R.W.; Salemink, E.; Pettit, J.W.; et al. A computational network perspective on pediatric anxiety symptoms. Psychol. Med. 2021, 51, 1752–1762. [Google Scholar] [CrossRef]
- Barrett, L.F. Valence is a basic building block of emotional life. J. Res. Personal. 2006, 40, 35–55. [Google Scholar] [CrossRef]
- Li, Y.; Masitah, A.; Hills, T.T. The Emotional Recall Task: Juxtaposing recall and recognition-based affect scales. J. Exp. Psychol. Learn. Mem. Cogn. 2020, 46, 1782–1794. [Google Scholar] [CrossRef]
- Montefinese, M.; Ambrosini, E.; Angrilli, A. Online search trends and word-related emotional response during COVID-19 lockdown in Italy: A cross-sectional online study. PeerJ 2021, 9, e11858. [Google Scholar] [CrossRef]
- Mohammad, S. Obtaining reliable human ratings of valence, arousal, and dominance for 20,000 English words. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), Melbourne, Australia, 15–20 July 2018; pp. 174–184. [Google Scholar]
- Posner, J.; Russell, J.A.; Peterson, B.S. The circumplex model of affect: An integrative approach to affective neuroscience, cognitive development, and psychopathology. Dev. Psychopathol. 2005, 17, 715–734. [Google Scholar] [CrossRef]
- Tellegen, A. Structures of Mood and Personality and Their Relevance to Assessing Anxiety, with an Emphasis on Self-Report; Lawrence Erlbaum Associates, Inc.: Mahwah, NJ, USA, 1985. [Google Scholar]
- Watson, D.; Clark, L.A.; Tellegen, A. Development and validation of brief measures of positive and negative affect: The PANAS scales. J. Personal. Soc. Psychol. 1988, 54, 1063. [Google Scholar] [CrossRef]
- Tugade, M.M.; Fredrickson, B.L.; Feldman Barrett, L. Psychological resilience and positive emotional granularity: Examining the benefits of positive emotions on coping and health. J. Personal. 2004, 72, 1161–1190. [Google Scholar] [CrossRef]
- Kenett, Y.N.; Faust, M. Clinical cognitive networks: A graph theory approach. In Network Science in Cognitive Psychology; Routledge: London, UK, 2019; pp. 136–165. [Google Scholar]
- Beaty, R.E.; Zeitlen, D.C.; Baker, B.S.; Kenett, Y.N. Forward Flow and Creative Thought: Assessing Associative Cognition and its Role in Divergent Thinking. Think. Ski. Creat. 2021, 41, 100859. [Google Scholar] [CrossRef]
- Siew, C.S.; Wulff, D.U.; Beckage, N.M.; Kenett, Y.N. Cognitive network science: A review of research on cognition through the lens of network representations, processes, and dynamics. Complexity 2019, 2019, 2108423. [Google Scholar] [CrossRef]
- Kenett, Y.N.; Levy, O.; Kenett, D.Y.; Stanley, H.E.; Faust, M.; Havlin, S. Flexibility of thought in high creative individuals represented by percolation analysis. Proc. Natl. Acad. Sci. USA 2018, 115, 867–872. [Google Scholar] [CrossRef] [Green Version]
- Kumar, A.A. Semantic memory: A review of methods, models, and current challenges. Psychon. Bull. Rev. 2021, 28, 40–80. [Google Scholar] [CrossRef]
- Stella, M.; Kenett, Y.N. Viability in multiplex lexical networks and machine learning characterizes human creativity. Big Data Cogn. Comput. 2019, 3, 45. [Google Scholar] [CrossRef] [Green Version]
- Hills, T.T.; Jones, M.N.; Todd, P.M. Optimal foraging in semantic memory. Psychol. Rev. 2012, 119, 431. [Google Scholar] [CrossRef] [Green Version]
- Golino, H.F.; Epskamp, S. Exploratory graph analysis: A new approach for estimating the number of dimensions in psychological research. PLoS ONE 2017, 12, e0174035. [Google Scholar]
- Tohalino, J.A.; Quispe, L.V.; Amancio, D.R. Analyzing the relationship between text features and grants productivity. Scientometrics 2021, 126, 4255–4275. [Google Scholar] [CrossRef]
- Teixeira, A.S.; Talaga, S.; Swanson, T.J.; Stella, M. Revealing semantic and emotional structure of suicide notes with cognitive network science. arXiv 2020, arXiv:2007.12053. [Google Scholar] [CrossRef]
- Zemla, J.C.; Cao, K.; Mueller, K.D.; Austerweil, J.L. SNAFU: The semantic network and fluency utility. Behav. Res. Methods 2020, 52, 1681–1699. [Google Scholar] [CrossRef] [Green Version]
- Morgan, S.E.; Diederen, K.; Vertes, P.E.; Ip, S.H.; Wang, B.; Thompson, B.; Demjaha, A.; De Micheli, A.; Oliver, D.; Liakata, M.; et al. Assessing psychosis risk using quantitative markers of disorganised speech. medRxiv 2021. [Google Scholar] [CrossRef]
- Morgan, S.; Diederen, K.; Vértes, P.; Ip, S.; Wang, B.; Thompson, B.; Demjaha, A.; De Micheli, A.; Oliver, D.; Liakata, M.; et al. Natural Language Processing markers in first episode psychosis and people at clinical high-risk. Transl. Psychiatry 2021. [Google Scholar] [CrossRef]
- Schoene, A.M.; Dethlefs, N. Automatic identification of suicide notes from linguistic and sentiment features. In Proceedings of the 10th SIGHUM Workshop on Language Technology for Cultural Heritage, Social Sciences, and Humanities, Berlin, Germany, 11 August 2016; pp. 128–133. [Google Scholar]
- Schoene, A.M.; Turner, A.; De Mel, G.R.; Dethlefs, N. Hierarchical Multiscale Recurrent Neural Networks for Detecting Suicide Notes. IEEE Trans. Affect. Comput. 2021. [Google Scholar] [CrossRef]
- Stella, M.; Restocchi, V.; De Deyne, S. # lockdown: Network-enhanced emotional profiling in the time of COVID-19. Big Data Cogn. Comput. 2020, 4, 14. [Google Scholar]
- Pachur, T.; Hertwig, R.; Steinmann, F. How do people judge risks: Availability heuristic, affect heuristic, or both? J. Exp. Psychol. Appl. 2012, 18, 314. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Tversky, A.; Kahneman, D. Availability: A heuristic for judging frequency and probability. Cogn. Psychol. 1973, 5, 207–232. [Google Scholar] [CrossRef]
- De Deyne, S.; Navarro, D.J.; Perfors, A.; Brysbaert, M.; Storms, G. The “Small World of Words” English word association norms for over 12,000 cue words. Behav. Res. Methods 2019, 51, 987–1006. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Hills, T.T.; Maouene, M.; Maouene, J.; Sheya, A.; Smith, L. Longitudinal analysis of early semantic networks: Preferential attachment or preferential acquisition? Psychol. Sci. 2009, 20, 729–739. [Google Scholar] [CrossRef] [Green Version]
- Stella, M.; Beckage, N.M.; Brede, M. Multiplex lexical networks reveal patterns in early word acquisition in children. Sci. Rep. 2017, 7, 1–10. [Google Scholar]
- Castro, N.; Stella, M.; Siew, C.S. Quantifying the interplay of semantics and phonology during failures of word retrieval by people with aphasia using a multiplex lexical network. Cogn. Sci. 2020, 44, e12881. [Google Scholar] [CrossRef]
- Kumar, A.A.; Balota, D.A.; Steyvers, M. Distant connectivity and multiple-step priming in large-scale semantic networks. J. Exp. Psychol. Learn. Mem. Cogn. 2020, 46, 2261. [Google Scholar] [CrossRef]
- Kenett, Y.N.; Levi, E.; Anaki, D.; Faust, M. The semantic distance task: Quantifying semantic distance with semantic network path length. J. Exp. Psychol. Learn. Mem. Cogn. 2017, 43, 1470. [Google Scholar] [CrossRef]
- De Deyne, S.; Navarro, D.J.; Storms, G. Better explanations of lexical and semantic cognition using networks derived from continued rather than single-word associations. Behav. Res. Methods 2013, 45, 480–498. [Google Scholar] [CrossRef] [Green Version]
- Smith, A.M.; Hughes, G.I.; Davis, F.C.; Thomas, A.K. Acute stress enhances general-knowledge semantic memory. Horm. Behav. 2019, 109, 38–43. [Google Scholar] [CrossRef]
- Kenett, Y.; Baker, B.; Hills, T.; Hart, Y.; Beaty, R. Creative Foraging: Examining Relations Between Foraging Styles, Semantic Memory Structure, and Creative Thinking. In Proceedings of the Annual Meeting of the Cognitive Science Society, Vienna, Austria, 25–29 July 2021; Volume 43. [Google Scholar]
- Pedregosa, F.; Varoquaux, G.; Gramfort, A.; Michel, V.; Thirion, B.; Grisel, O.; Blondel, M.; Prettenhofer, P.; Weiss, R.; Dubourg, V.; et al. Scikit-learn: Machine learning in Python. J. Mach. Learn. Res. 2011, 12, 2825–2830. [Google Scholar]
- Hassani, H.; Beneki, C.; Unger, S.; Mazinani, M.T.; Yeganegi, M.R. Text mining in big data analytics. Big Data Cogn. Comput. 2020, 4, 1. [Google Scholar] [CrossRef] [Green Version]
- Hills, T.T.; Kenett, Y.N. Networks of the Mind: How Can Network Science Elucidate Our Understanding of Cognition? Top. Cogn. Sci. 2021. [Google Scholar] [CrossRef]
- Stella, M.; De Domenico, M. Distance entropy cartography characterises centrality in complex networks. Entropy 2018, 20, 268. [Google Scholar] [CrossRef] [Green Version]
- Alpaydin, E. Introduction to Machine Learning; MIT Press: Cambridge, MA, USA, 2020. [Google Scholar]
- Gardner, M.W.; Dorling, S. Artificial neural networks (the multilayer perceptron)—A review of applications in the atmospheric sciences. Atmos. Environ. 1998, 32, 2627–2636. [Google Scholar] [CrossRef]
- Vankrunkelsven, H.; Verheyen, S.; De Deyne, S.; Storms, G. Predicting lexical norms using a word association corpus. In Proceedings of the 37th Annual Conference of the Cognitive Science Society, Pasadena, CA, USA, 22–25 July 2015; pp. 2463–2468. [Google Scholar]
- Amancio, D.R.; Oliveira, O.N., Jr.; da Fontoura Costa, L. Identification of literary movements using complex networks to represent texts. New J. Phys. 2012, 14, 043029. [Google Scholar] [CrossRef]
- Stella, M. Text-mining forma mentis networks reconstruct public perception of the STEM gender gap in social media. PeerJ Comput. Sci. 2020, 6, e295. [Google Scholar] [CrossRef]
- Mohammad, S.M. Sentiment analysis: Automatically detecting valence, emotions, and other affectual states from text. In Emotion Measurement; Elsevier: Amsterdam, The Netherlands, 2021; pp. 323–379. [Google Scholar]
- Irving, J.; Patel, R.; Oliver, D.; Colling, C.; Pritchard, M.; Broadbent, M.; Baldwin, H.; Stahl, D.; Stewart, R.; Fusar-Poli, P. Using natural language processing on electronic health records to enhance detection and prediction of psychosis risk. Schizophr. Bull. 2021, 47, 405–414. [Google Scholar] [CrossRef]
- Citraro, S.; Rossetti, G. Identifying and exploiting homogeneous communities in labeled networks. Appl. Netw. Sci. 2020, 5, 1–20. [Google Scholar] [CrossRef]
- Ghavasieh, A.; Stella, M.; Biamonte, J.; De Domenico, M. Unraveling the effects of multiscale network entanglement on empirical systems. Commun. Phys. 2021, 4, 1–10. [Google Scholar] [CrossRef]
- Stella, M. Cognitive network science for understanding online social cognitions: A brief review. Top. Cogn. Sci. 2021. [Google Scholar] [CrossRef]
- Jung, A.; Vesselinova, N. Analysis of network lasso for semi-supervised regression. In Proceedings of the 22nd International Conference on Artificial Intelligence and Statistics, Naha, Japan, 16–18 April 2019; pp. 380–387. [Google Scholar]
- Morini, V.; Pollacci, L.; Rossetti, G. Toward a Standard Approach for Echo Chamber Detection: Reddit Case Study. Appl. Sci. 2021, 11, 5390. [Google Scholar] [CrossRef]
- Hills, T.T.; Proto, E.; Sgroi, D.; Seresinhe, C.I. Historical analysis of national subjective wellbeing using millions of digitized books. Nat. Hum. Behav. 2015, 3, 1271–1275. [Google Scholar] [CrossRef]
- Simon, F.M.; Camargo, C.Q. Autopsy of a metaphor: The origins, use and blind spots of the ‘infodemic’. New Media Soc. 2021. [Google Scholar] [CrossRef]
- Li, Y.; Luan, S.; Li, Y.; Hertwig, R. Changing emotions in the COVID-19 pandemic: A four-wave longitudinal study in the United States and China. Soc. Sci. Med. 2021, 285, 114222. [Google Scholar] [CrossRef] [PubMed]
- Cinelli, M.; Quattrociocchi, W.; Galeazzi, A.; Valensise, C.M.; Brugnoli, E.; Schmidt, A.L.; Zola, P.; Zollo, F.; Scala, A. The COVID-19 social media infodemic. Sci. Rep. 2020, 10, 1–10. [Google Scholar]
- Semeraro, A.; Vilella, S.; Ruffo, G. PyPlutchik: Visualising and comparing emotion-annotated corpora. PLoS ONE 2021. [Google Scholar] [CrossRef] [PubMed]
- Radicioni, T.; Squartini, T.; Pavan, E.; Saracco, F. Networked partisanship and framing: A socio-semantic network analysis of the Italian debate on migration. arXiv 2021, arXiv:2103.04653. [Google Scholar] [CrossRef]
DAS Constructs | Binary BOW | Cognitive Weighted BOW | ||
---|---|---|---|---|
MSE Loss | MSE Loss | |||
Depression | 30.7 ± 0.1 | 0.19 ± 0.01 | 22.0 ± 0.1 | 0.40 ± 0.02 |
Anxiety | 16.2 ± 0.1 | 0.03 ± 0.01 | 14.5 ± 0.1 | 0.15 ± 0.02 |
Stress | 27.6 ± 0.1 | 0.03 ± 0.01 | 19.3 ± 0.1 | 0.26 ± 0.01 |
Cognitive-Network Embedded BOW with: | Construct | MSE Loss | |
---|---|---|---|
All Conceptual Distances + Cover. + Entr. | Depression | 18.6 ± 0.4 | 0.49 ± 0.01 |
Anxiety | 14.3 ± 0.3 | 0.20 ± 0.02 | |
Stress | 19.3 ± 0.3 | 0.27 ± 0.01 | |
Only Distances from Depression/Anxiety/Stress + Cover. + Entr. | Depression | 19.5 ± 0.5 | 0.46 ± 0.01 |
Anxiety | 14.4 ± 0.3 | 0.17 ± 0.02 | |
Stress | 19.0 ± 0.4 | 0.28 ± 0.02 | |
Only Distances from Happy/Sad + Cover. + Ent. | Depression | 20.6 ± 0.5 | 0.43 ± 0.01 |
Anxiety | 14.9 ± 0.2 | 0.15 ± 0.01 | |
Stress | 19.3 ± 0.4 | 0.27 ± 0.01 | |
Only Cover. + Entr. | Depression | 19.5 ± 0.6 | 0.45 ± 0.01 |
Anxiety | 14.7 ± 0.2 | 0.15 ± 0.01 | |
Stress | 19.2 ± 0.4 | 0.27 ± 0.02 | |
Cover. + Entr. + All Distances except from Fear | Depression | 18.5 ± 0.3 | 0.49 ± 0.01 |
Anxiety | 13.9 ± 0.3 | 0.23 ± 0.02 | |
Stress | 18.9 ± 0.5 | 0.28 ± 0.01 | |
Distance from Fear only | Anxiety | 14.6 ± 0.2 | 0.16 ± 0.01 |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Fatima, A.; Li, Y.; Hills, T.T.; Stella, M. DASentimental: Detecting Depression, Anxiety, and Stress in Texts via Emotional Recall, Cognitive Networks, and Machine Learning. Big Data Cogn. Comput. 2021, 5, 77. https://doi.org/10.3390/bdcc5040077
Fatima A, Li Y, Hills TT, Stella M. DASentimental: Detecting Depression, Anxiety, and Stress in Texts via Emotional Recall, Cognitive Networks, and Machine Learning. Big Data and Cognitive Computing. 2021; 5(4):77. https://doi.org/10.3390/bdcc5040077
Chicago/Turabian StyleFatima, Asra, Ying Li, Thomas Trenholm Hills, and Massimo Stella. 2021. "DASentimental: Detecting Depression, Anxiety, and Stress in Texts via Emotional Recall, Cognitive Networks, and Machine Learning" Big Data and Cognitive Computing 5, no. 4: 77. https://doi.org/10.3390/bdcc5040077
APA StyleFatima, A., Li, Y., Hills, T. T., & Stella, M. (2021). DASentimental: Detecting Depression, Anxiety, and Stress in Texts via Emotional Recall, Cognitive Networks, and Machine Learning. Big Data and Cognitive Computing, 5(4), 77. https://doi.org/10.3390/bdcc5040077