LENNA (Learning Emotions Neural Network Assisted): An Empathic Chatbot Designed to Study the Simulation of Emotions in a Bot and Their Analysis in a Conversation
Abstract
:1. Introduction
2. Methods
2.1. LENNA Architecture
- (“alarmed”, “neg”), (“tense”, “neg”), (“angry”, “neg”), (“afraid”, “neg”), (“annoyed”, “neg”), (“distressed”, “neg”), (“frustrated”, “neg”), (“fear”, “neg”), (“anxiety”, “neg”), (“agitated”, “neg”), (“furious”, “neg”), “bitter”, “neg”), (“irritated”, “neg”), (“mad”, “neg”), (“resentful”, “neg”), (“fed up”, “neg”), (“aroused”, “neg”), (“astonished”, “neg”), (“excited”, “neg”), (“delighted”, “neg”), (“happy”, “neg”), (“surprised”, “neg”), (“determined”, “neg”), (“awe”, “neg”), (“amusement”, “neg”), (“joyful”, “neg”), (“optimistic”, “neg”), (“enthusiastic”, “neg”), (“loving”, “neg”), (“pleased”, “neg”), (“charmed”, “neg”), (“grateful”, “neg”), (“miserable”, “pos”), (“sad”, “pos”), (“gloomy”, “pos”), (“depressed”, “pos”), (“bored”, “pos”), (“droopy”, “pos”), (“tired”, “pos”), (“worried”, “pos”), (“taken back”, “pos”), (“shocked”, “pos”), (“dull”, “pos”), (“anxious”, “pos”), (“guilty”, “pos”), (“lonely”, “pos”), (“disappointed”, “pos”), (“indifferent”, “pos”), (“fatigued”, “pos”), (“desperate”, “pos”), (“troubled”, “pos”), (“pleased”, “pos”), (“glad”, “pos”), (“serene”, “pos”), (“content”, “pos”), (“at ease”, “pos”), (“satisfied”, “pos”), (“relaxed”, “pos”), (“calm”, “pos”), (“confident”, “pos”), (“hopeful”, “pos”), (“peaceful”, “pos”), (“comforted”, “pos”), (“powerful”, “pos”), (“empowered”, “pos”), (“sure”, “pos”), (“dynamic”, “pos”), (“ambitious”, “pos”). In the training set, “neg” labels class 0 and “pos” labels class 1.
- (“alarmed”, “neg”), (“tense”, “neg”), (“angry”, “neg”), (“afraid”, “neg”), (“annoyed”, “neg”), (“distressed”, “neg”), (“frustrated”, “neg”), (“fear”, “neg”), (“anxiety”, “neg”), (“agitated”, “neg”), (“furious”, “neg”), (“bitter”, “neg”), (“irritated”, “neg”), (“mad”, “neg”), (“resentful”, “neg”), (“fed up”, “neg”), (“aroused”, “pos”), (“astonished”, “pos”), (“excited”, “pos”), (“delighted”, “pos”), (“happy”, “pos”), (“surprised”, “pos”), (“determined”, “pos”), (“awe”, “pos”), (“amusement”, “pos”), (“joyful”, “pos”), (“optimistic”, “pos”), (“enthusiastic”, “pos”), (“loving”, “pos”), (“pleased”, “pos”), (“charmed”, “pos”), (“grateful”, “pos”), (“miserable”, “neg”), (“sad”, “neg”), (“gloomy”, “neg”), (“depressed”, “neg”), (“bored”, “neg”), (“droopy”, “neg”), (“tired”, “neg”), (“worried”, “neg”), (“taken back”, “neg”), (“shocked”, “neg”), (“dull”, “neg”), (“anxious”, “neg”), (“guilty”, “neg”), (“lonely”, “neg”), (“disappointed”, “neg”), (“indifferent”, “neg”), (“fatigued”, “neg”), (“desperate”, “neg”), (“troubled”, “neg”), (“pleased”, “pos”), (“glad”, “pos”), (“serene”, “pos”), (“content”, “pos”), (“at ease”, “pos”), (“satisfied”, “pos”), (“relaxed”, “pos”), (“calm”, “pos”), (“confident”, “pos”), (“hopeful”, “pos”), (“peaceful”, “pos”), (“comforted”, “pos”), (“powerful”, “pos”), (“empowered”, “pos”), (“sure”, “pos”), (“dynamic”, “pos”), (“ambitious”, “pos”). In this training set, “neg” refers to class 0 and “pos” to class 1.
- For each one of the inputs, AL and V, of the neural network, we calculate the output y(t) of the network. Thus, once we have calculated the net value of the following:We obtain output y(t), which is given by the following sigmoid activation function.
- In cases where y is different from d, which is the neuron with an error, the weights of the connections should be modified according to the following learning rule.
2.2. Simulation Experiments
- -
- A human interlocutor knowing the LENNA vocabulary converses with LENNA. The interlocutor in this experiment is labeled as HKV (human knows vocabulary).
- -
- A human interlocutor has a conversation with LENNA, but the person does not know the vocabulary with which LENNA has been trained. The interlocutor in this experiment is labeled as HIV (human ignores vocabulary).
- -
- A bot, i.e., an artificial interlocutor, converses with LENNA. Obviously, the bot ignores LENNA vocabulary. The following bots were selected from a chatbot repository [30]: alice, AMA, bible, brain_bot, Einstein, eliza, parry, plumber, robo_woman and rosie, and they exhibit different “personalities”. For example, eliza and alice are the classic Weizenbaum bots that imitate the style of a “rongerian psychotherapist”, while Einstein and plumber have a specialized conversation. Others such as parry simulate a subject suffering from paranoid schizophrenia or bible who always responds with quotes from Genesis.
2.3. Statistical Analysis
3. Results
4. Conclusions
5. Discussion
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Weizenbaum, J. ELIZA—A computer program for the study of natural language communication between man and machine. Commun. ACM 1966, 9, 36–45. [Google Scholar] [CrossRef]
- Rogers, C. A theory of therapy, personality and interpersonal relationships as developed in the client-centered framework. In Psychology: A Study of a Science. Volume 3: Formulations of the Person and the Social Context; Koch, S., Ed.; McGraw Hill: New York, NY, USA, 2010. [Google Scholar]
- Colby, K.M.; Hilf, F.D.; Weber, S.; Kraemer, H. Turing-like indistinguishability tests for the validation of a computer simulation of paranoid processes. Artif. Intell. 1972, 3, 199–221. [Google Scholar] [CrossRef]
- Pamungkas, E.W. Emotionally-aware chatbots: A survey. arXiv 2019, arXiv:1906.09774. [Google Scholar]
- Darwin, C. The Expression of the Emotions in Man and Animals; John Murray: London, UK, 1872. [Google Scholar]
- Picard, R.W. Affective computing for future agents. In Cooperative Information Agents IV—The Future of Information Agents in Cyberspace. CIA 2000; Klusch, M., Kerschberg, L., Eds.; Lecture Notes in Computer Science; Springer: Berlin/Heidelberg, Germany, 2000; Volume 1860. [Google Scholar] [CrossRef]
- Ghandeharioun, A.; McDuff, D.; Czerwinski, M.; Rowan, K. EMMA: An emotion-aware wellbeing chatbot. In Proceedings of the 8th International Conference on Affective Computing and Intelligent Interaction (ACII), Cambridge, UK, 3–6 September 2019; pp. 1–7. [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]
- Gupta, S.; Borkar, D.; De Mello, C.; Patil, S. An e-commerce website based chatbot. Int. J. Comput. Sci. Inf. Technol. 2015, 6, 1483–1485. [Google Scholar]
- Ho, A.; Hancock, J.; Miner, A.S. Psychological, relational, and emotional effects of self-disclorsure after conversations with a chatbot. J. Commun. 2018, 68, 712–733. [Google Scholar] [CrossRef] [PubMed]
- Romero, M.; Casadevante, C.; Montoro, H. How to create a psychologist-chatbot. Psychol. Pap. 2020, 41, 27–34. [Google Scholar]
- Denecke, K.; May, R.; Deng, Y. Towards emotion-sensitive conversational user interfaces in healthcare applications. Stud. Health Technol. Inform. 2019, 264, 1164–1168. [Google Scholar]
- Zunszain, P.A.; Hepgul, N.; Pariante, C.M. Inflammation and depression. Curr. Top. Behav. Neurosci. 2013, 14, 135–151. [Google Scholar]
- Murata, M. Inflammation and cancer. Environ. Health Prev. Med. 2018, 23, 50–58. [Google Scholar] [CrossRef] [Green Version]
- Raman, J.; Smith, E.; Hay, P. The clinical obesity maintenance model: An integration of psychological constructs including mood, emotional regulation, disordered overeating, habitual cluster behaviours, health literacy and cognitive function. J. Obes. 2013, 2013, 240128. [Google Scholar] [CrossRef]
- Lahoz-Beltra, R.; Rodriguez, R.J. Modeling a cancerous tumor development in a virtual patient suffering from a depressed state of mind: Simulation of somatic evolution with a customized genetic algorithm. Biosystems 2020, 198, 104261. [Google Scholar] [CrossRef]
- Spring, T.; Casas, J.; Daher, K.; Mugellini, E.; Abou Khaled, O. Empathic response generation in chatbots. In Proceedings of the 4th Swiss Text Anlytics Conference (SwissText 2019), Winterthur, Switzerland, 18–19 June 2019. [Google Scholar]
- Pang, B.; Lee, L. Opinion mining and sentiment analysis. Found. Trends Inf. Retr. 2008, 2, 1–135. [Google Scholar] [CrossRef] [Green Version]
- Wilson, T.; Wiebe, J.; Hoffmann, P. Recognizing contextual polarity in phrase-level sentiment analysis. In Proceedings of the Conference on Human Language Technology and Empirical Methods in Natural Language Processing (HLT ‘05), Vancouver, BC, Canada, 6–8 October 2005; Association for Computational Linguistics: Stroudsburg, PA, USA, 2005; pp. 347–354. [Google Scholar] [CrossRef] [Green Version]
- Dayhoff, J.; Deleo, J. Artificial neural networks: Opening the black box. Cancer 2001, 91, 1615–1635. [Google Scholar] [CrossRef]
- Tzirakis, P.; Trigeorgis, G.; Nicolaou, M.A.; Schuller, B.W.; Zafeiriou, S. End-to-end multimodal emotion recognition using deep neural networks. IEEE J. Sel. Top. Signal. Process. 2017, 11, 1301–1309. [Google Scholar] [CrossRef] [Green Version]
- Xu, Q.-Z.; Wang, L. Recent advances in the artificial endocrine system. J. Zhejiang Univ.-Sci. Comput. Electron. 2011, 12, 171–183. [Google Scholar] [CrossRef]
- Strout, J.; Epler, J. Eliza.py, ELIZA in Python. 2017. Available online: https://github.com/jezhiggins/eliza.py (accessed on 8 October 2021).
- MacLean, P.D. Some psychiatric implications of physiological studies on frontotemporal portion of limbic system (visceral brain). Electroencephalogr. Clin. Neurophysiol. 1952, 4, 407–418. [Google Scholar] [CrossRef]
- Ekman, P.; Sorenson, E.R.; Friesen, W.V. Pancultural elements in facial displays of emotions. Science 1969, 164, 86–88. [Google Scholar] [CrossRef] [Green Version]
- Shiota, M.N. Ekman’s theory of basic emotions. In The Sage Encyclopedia of Theory in Psychology; Harold, L.M., Ed.; Sage Publications: Thousand Oaks, CA, USA, 2016; pp. 248–250. [Google Scholar]
- Yu, L.-C.; Lee, L.-H.; Hao, S.; Wang, J.; He, Y.; Hu, J.; Lai, K.R.; Zhang, X. Building Chinese affective resources in valence-arousal dimensions. In Proceedings of the NAACL-HLT 2016, San Diego, CA, USA, 12–17 June 2016; pp. 540–545. [Google Scholar]
- Lahoz-Beltra, R. Bioinformática: Simulación, Vida Artificial e Inteligencia Artificial; Ediciones Díaz de Santos: Madrid, Spain, 2004. [Google Scholar]
- Loria, S. TextBlob Documentation. Release v0.16.0. 2020. Available online: https://textblob.readthedocs.io/en/dev/ (accessed on 8 October 2021).
- BOT LIBRE. The Open Source Chatbot and Artificial Intelligence Platform. Available online: https://www.botlibre.com/ (accessed on 8 October 2021).
- Kozlowski, L. Shannon Entropy Calculator. 2021. Available online: https://www.shannonentropy.netmark.pl/ (accessed on 8 October 2021).
- Jockers, M. Syuzhet. Release 1.0.6. 2020. Available online: https://cran.r-project.org/web/packages/syuzhet/syuzhet.pdf (accessed on 8 October 2021).
- Mohammad, S.M.; Turney, P.D. NRC Emotion Lexicon. Release 0.92. Available online: https://saifmohammad.com/WebPages/AccessResource.htm (accessed on 8 October 2021).
- Jockers, M.L. Revealing Sentiment and Plot Arcs with the Syuzhet Package. 2015. Available online: https://www.matthewjockers.net/2015/02/02/syuzhet/ (accessed on 8 October 2021).
- Schürmann, T.; Grassberger, P. Entropy estimation of symbol sequences. Chaos 1996, 6, 414–427. [Google Scholar] [CrossRef] [PubMed]
- Helmi Setyawan, M.Y.; Awangga, R.M.; Efendi, S. Comparison of multinomial naive Bayes algorithm and logistic regression for intent classification in chatbot. In Proceedings of the 2018 International Conference on Applied Engineering (ICAE), Batam, Indonesia, 3–4 October 2018; pp. 1–5. [Google Scholar] [CrossRef]
- Smys, S.; Haoxiang, W. Naïve Bayes and entropy based analysis and classification of humans and chat bots. J. ISMAC 2021, 3, 40–49. [Google Scholar]
- Anapuma, C.V. Chatbot disease prediction and treatment recommendation using machine learning. High Technol. Lett. 2021, 27, 354–358. [Google Scholar]
- Zygadło, A.; Kozłowski, M.; Janicki, A. Text-Based emotion recognition in English and Polish for therapeutic chatbot. Appl. Sci. 2021, 11, 10146. [Google Scholar] [CrossRef]
- Sarosa, M.; Junus, M.; Hoesny, M.; Sari, Z.; Fatnuriyah, M. Classification technique of interviewer-bot result using naïve Bayes and phrase reinforcement algorithms. Int. J. Emerg. Technol. Learn. IJET 2018, 13, 33–47. [Google Scholar] [CrossRef] [Green Version]
- Tamizharasi, B.; Livingston, J.; Rajkumar, S. Building a medical chatbot using support vector machine learning algorithm. J. Phys. Conf. Ser. 2021, 1716, 012059. [Google Scholar] [CrossRef]
- Kasckow, J.W.; Baker, D.; Geracioti, T.D., Jr. Corticotropin-releasing hormone in depression and post-traumatic stress disorder. Peptides 2001, 22, 845–851. [Google Scholar] [CrossRef]
- Thenius, R.; Zahadat, P.; Schmickl, T. EMANN—A model of emotions in an artificial neural network. In Proceedings of the ECAL 2013: The Twelfth European Conference on Artificial Life, Sicily, Italy, 2–6 September 2013; pp. 830–837. [Google Scholar] [CrossRef]
- Sauzé, C.; Neal, M. Artificial endocrine controller for power management in robotic systems. IEEE Trans. Neural Netw. Learn. Syst. 2013, 24, 1973–1985. [Google Scholar] [CrossRef]
- Temeng, V.; Yevenyo Ziggah, Y.; Arthur, C. A novel artificial intelligent model for predicting air overpressure using brain inspired emotional neural network. Int. J. Min. Sci. Technol. 2020, 30, 683–689. [Google Scholar] [CrossRef]
- Xu, F.; Zhang, J.; Wang, J.Z. Microexpression identification and categorization using a facial dynamics map. IEEE Trans. Affect. Comput. 2017, 8, 254–267. [Google Scholar] [CrossRef]
- Yan, F.; Iliyasu, A.M.; Jiao, S.; Yang, H. Quantum Structure for Modelling Emotion Space of Robots. Appl. Sci. 2019, 9, 3351. [Google Scholar] [CrossRef] [Green Version]
- Arbib, M.A.; Fellous, J.-M. Emotions: From brain to robot. TREND Cogn. Sci. 2004, 8, 554–561. [Google Scholar] [CrossRef] [Green Version]
- Samani, H.A.; Saadatian, E. A multidisciplinary artificial intelligence model of an affective robot. Int. J. Adv. Robot. Syst. 2012, 9, 6. [Google Scholar] [CrossRef]
Unpleasant 0 | Pleasant 1 | |
---|---|---|
High arousal 0 | Stress 00 (state 1) | Excitation 01 (state 2) |
Low arousal 1 | Depression 10 (state 3) | Healthy 11 (state 4) |
Stress | Excitation | Depression | Healthy |
---|---|---|---|
Alarmed, tense, angry, afraid, annoyed, distressed, frustrated, fed up, resentful, mad, irritated, fear, anxiety, agitated, furious and bitter. | Aroused, astonished, excited, delighted, happy, surprised, determined, awe, amusement, joyful, optimistic, enthusiastic, loving, pleased, charmed and grateful. | Miserable, sad, gloomy, depressed, bored, droopy, tired, worried, taken back, dull, anxious, guilty, lonely, disappointed, indifferent, fatigued, desperate and troubled. | Pleased, glad, serene, content, at ease, satisfied, relaxed, calm, hopeful, powerful, empowered, sure, dynamic, ambitious, confident, peaceful and comforted. |
Bayes 2/Polarity Test | ||
---|---|---|
Bayes 1 | Stress 00 (state 1) | Excitation 01 (state 2) |
Depression 10 (state 3) | Healthy 11 (state 4) |
AV | V | d |
---|---|---|
0 | 0 | 0.00 |
0 | 1 | 0.50 |
1 | 0 | 0.75 |
1 | 1 | 1.00 |
Group | n | Average | Standard Deviation |
---|---|---|---|
1 | 10 | 0.078221 | 0.051652 |
2 | 10 | 0.134791 | 0.0489143 |
3 | 10 | 0.134751 | 0.0426167 |
4 | 10 | 0.088339 | 0.0403524 |
5 | 10 | 0.166452 | 0.0260079 |
6 | 10 | 0.110264 | 0.0312346 |
Total | 60 | 0.118803 | 0.0496933 |
Bot | Emotional States | Entropy (Mean Entropy 0.07822) |
---|---|---|
alice | 0333334333333 | 0.05948 |
AMA | 033333 | 0.10834 |
bible | 0333333 | 0.08452 |
brain_bot | 0333333333 | 0.04690 |
Einstein | 0333333343333 | 0.0594 |
eliza | 03333333444433333 | 0.06390 |
parry | 03333333333 | 0.03995 |
plumber | 034333 | 0.20860 |
robo_woman | 0333333 | 0.08452 |
rosie | 03333333333333 | 0.02652 |
Bot | Emotional States | Entropy (Mean Entropy 0.13479) |
---|---|---|
alice | 0343434333 | 0.12955 |
AMA | 03333 | 0.14439 |
bible | 04343334443 | 0.12260 |
brain_bot | 03444443344 | 0.11279 |
Einstein | 04343434 | 0.17570 |
eliza | 03434344443 | 0.12020 |
parry | 03333333 | 0.06795 |
plumber | 044334 | 0.24319 |
robo_woman | 0333333 | 0.08452 |
rosie | 01433343334 | 0.14702 |
HKV (Mean Entropy 0.13475) | HIV (Mean Entropy 0.08833) | ||
---|---|---|---|
Emotional States | Entropy | Emotional States | Entropy |
01111333134 | 0.15243 | 0333331333 | 0.09219 |
03333333334 | 0.07871 | 0434333043433333333 | 0.06262 |
0232233322 | 0.13610 | 03333333333 | 0.03995 |
0433342434 | 0.17219 | 03143133333 | 0.13556 |
0333333333 | 0.04690 | 03333333333 | 0.03995 |
03131431313 | 0.15243 | 0333333333 | 0.04690 |
04344231333 | 0.17925 | 03333333433 | 0.07871 |
0231333333 | 0.13568 | 0334233333 | 0.13568 |
012133413343 | 0.17122 | 0333233343 | 0.13568 |
03223322323 | 0.12260 | 03431333333 | 0.11615 |
HKV (Mean Entropy 0.16645) | HLV (Mean Entropy 0.11026) | ||
---|---|---|---|
Emotional States | Entropy | Emotional States | Entropy |
013231333111 | 0.13750 | 03333433343 | 0.09962 |
03444434433 | 0.12020 | 03334331313 | 0.13556 |
02123142222 | 0.16978 | 0333333334 | 0.09219 |
0333313431 | 0.15710 | 0333033333430303344444333 | 0.05437 |
04432411334 | 0.19255 | 03333333343 | 0.07871 |
02423333422 | 0.16573 | 0343133343 | 0.15710 |
01113211331 | 0.14702 | 044443444 | 0.10960 |
03332343421 | 0.18549 | 02433343334 | 0.14702 |
01144312242 | 0.19660 | 0333343343 | 0.11568 |
02434114334 | 0.19255 | 03343434333 | 0.11279 |
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
Lahoz-Beltra, R.; López, C.C. LENNA (Learning Emotions Neural Network Assisted): An Empathic Chatbot Designed to Study the Simulation of Emotions in a Bot and Their Analysis in a Conversation. Computers 2021, 10, 170. https://doi.org/10.3390/computers10120170
Lahoz-Beltra R, López CC. LENNA (Learning Emotions Neural Network Assisted): An Empathic Chatbot Designed to Study the Simulation of Emotions in a Bot and Their Analysis in a Conversation. Computers. 2021; 10(12):170. https://doi.org/10.3390/computers10120170
Chicago/Turabian StyleLahoz-Beltra, Rafael, and Claudia Corona López. 2021. "LENNA (Learning Emotions Neural Network Assisted): An Empathic Chatbot Designed to Study the Simulation of Emotions in a Bot and Their Analysis in a Conversation" Computers 10, no. 12: 170. https://doi.org/10.3390/computers10120170
APA StyleLahoz-Beltra, R., & López, C. C. (2021). LENNA (Learning Emotions Neural Network Assisted): An Empathic Chatbot Designed to Study the Simulation of Emotions in a Bot and Their Analysis in a Conversation. Computers, 10(12), 170. https://doi.org/10.3390/computers10120170