Deep learning for affective computing: Text-based emotion recognition in decision support
Introduction
Emotions drive the ubiquitous decision-making of humans in their everyday lives [33,57,73]. Furthermore, emotional states can implicitly affect human communication, attention, and the personal ability to memorize information [20,22]. While the recognition and interpretation of emotional states often come naturally to humans, these tasks pose severe challenges to computational routines (e.g., [64,81]). As such, the term affective computing refers to techniques for detecting, recognizing, and predicting human emotions (e.g., joy, anger, sadness, trust, surprise, anticipation) with the goal of adapting computational systems to these states [62]. The resulting computer systems are not only capable of exhibiting empathy [61] but can also provide decision support tailored to the emotional state of individuals.
Emotional information is conveyed through a multiplicity of physical and physiological characteristics. Examples of such indicators include vital signs such as heart rate, muscle activity or sweat production on the surface of the skin (e.g., [46,80]). A different stream of research tries to infer emotions from the content and its mode of communication. These approaches to affective computing are primarily categorized by the modality of the message, i.e., whether it takes the form of speech, gesture, or written information [11]. In this terminology, affective computing can comprise both unimodal and multimodal analyses. For instance, videos allow for the recognition of facial expressions and vocal tone [15,26,74].
The focus of this work is on the unimodal analysis of written materials in English. This choice reflects the prominence of textual materials as a widespread basis for decision-making [35]. Illustrative examples are as follows (a detailed review is given later in Section 5.3). For instance, the use of affective language as a proxy for emotional closeness can be used to measure the strength of interpersonal ties in social networks [49]. Similarly, marketing utilizes the recognition of emotional states in order to predict the purchase intentions of customers [6], satisfaction with services [32], and even to measure the overall brand reputation [2]. In a related context, decision support can leverage affective signals in financial materials in order to suggest trading decisions [30] or forecast the economic climate [58]. Furthermore, affect can also improve processes and decision-making in the provision of healthcare [76] or education [70].
Previous research on affective computing has merely utilized methods from traditional machine learning, while recent advances from the field of deep learning – namely, recurrent neural networks and transfer learning – have been widely overlooked. However, their use promises further improvements. In fact, techniques from deep learning have become prominent in various decision support activities involving sequential data (e.g., [27]) and especially linguistic materials (e.g., [41,47]), where deep learning was able to enhance the performance when deriving decisions from unstructured data. One of the inherent advantages of deep learning is that it can successfully model highly non-linear relationships.
This work draws upon existing solution techniques from the realm of deep learning [41] and applies them to a problem domain different from that of our research objective. First and foremost, we extend existing techniques from the discipline of deep learning to the task of text-based emotion recognition in order to expand the body of knowledge. Following Kraus & Feuerriegel [41], we also utilize long short-term memory networks (LSTMs) that can make predictions based on running texts of varying lengths. However, affective computing differs substantially from related tasks due to the high number of often imbalanced target labels. Thus, this task requires both customized network architectures and procedures. Hence, its applicability is only made possible through the several methodological innovations that we summarize in the following.
In order to handle class imbalances in affective computing, we propose the following modifications beyond Kraus & Feuerriegel [41]: (i) bidirectional processing of the text, (ii) dropout layers as a means of regularization, and (iii) a weighted loss function. The latter becomes especially critical due to the imbalanced distribution of labels. In fact, without the weighted loss function, the network ends up resembling merely a majority class vote.
We further propose an extension of transfer learning called sent2affect. That is, the network is first trained on the basis of sentiment analysis and, after exchanging the output layer, is then tuned to the task of emotion recognition. To the best of our knowledge, this presents a novel strategy for better affective computing as the inductive knowledge transfer is not merely based on a different dataset, but a different task.
Even though affective computing has gained great traction over the past several years [69], there is a scarcity of widely-accepted datasets for text-based emotion recognition that can be used for benchmarking and that facilitate fair comparisons. A relatively small, but more common, dataset was provided by SemEval-2007 and consists of annotated news headlines [78]. A significantly larger, but underutilized, corpus is composed of affect-labeled literary tales [4]. Our literature review notes considerable differences across datasets that vary in their linguistic style, domain, affective dimensions, and the structure of the outcome variable. With regard to the latter, the majority of datasets involve a classification task in which exactly one affective category is assigned to a document, while others request a numerical score across multiple dimensions, i.e., a regression task. Hence, it is a by-product of this research to contribute a holistic comparison that benchmarks different methods across datasets used in prior research. For this purpose, we conducted an extensive search for affect-labeled datasets that serves as the foundation for our computational experiments. As a result, we find that deep learning consistently outperforms the baselines from traditional machine learning. In fact, we observe performance improvements of up to 23.2% in F1-score as part of classification tasks and 11.6% in mean squared error as part of regression tasks.
The findings of this work have direct implications for management, practice, and research. As such, various application areas of decision support – such as customer support, marketing, or recommender systems – can be improved considerably through the use of affective computing. Similarly, all systems with human-computer interactions (e.g. chatbots and personal assistants) could further benefit from emotion recognition and a deeper understanding of empathy. In fact, emotion detection could significantly impact and refine all use cases in which sentiment analysis (i.e., only positive/negative polarity) has already proved to be a valuable approach, since these lend themselves to a more fine-grained analysis and decision-making beyond only one dimension. In academia, text-based emotion recognition supports the cognitive and social sciences as a new approach to measuring and interpreting individual and collective emotional states.
The rest of this paper is structured as follows. Section 2 reviews earlier works on text-based emotion recognition, including the underlying affect theories, datasets used for benchmarking, and computational approaches. This reveals a research gap with regard to both deep neural networks and transfer learning within the field of affective computing. As a remedy, Section 3 introduces our methods rooted in deep learning, which are then evaluated in Section 4. Based on our findings, we detail implications for both research and management in Section 5, while Section 6 concludes.
Section snippets
Background
We specifically point out that the terms “sentiment analysis” and “affective computing” are often used interchangeably [17]. However, comprehensive surveys [60,88] recognize clear differences that distinguish each concept: sentiment analysis measures the subjective polarity towards entities in terms of only two dimensions, namely, positivity and negativity. Conversely, affective computing concerns the identification of explicit emotional states and, hence, this approach is also referred to as
Methods
This section presents our methods for inferring emotional states from narrative contents. We first summarize our baselines from traditional machine learning and deep learning, while the inherent nature of affective computing requires us to come up with multiple innovations concerning the network architecture. Our proposed advances are detailed in Section 3.3. Finally, we detail our novel approach to transfer learning, called sent2affect, whereby knowledge from the related task of sentiment
Evaluation
This section reports our computational experiments evaluating the improvements gained by using deep neural networks (and especially transfer learning) for affective computing. Here we draw upon all datasets from Table 1 and, according to the type of the underlying affect theory, we divide the performance measurements into classification and regression tasks.
Comparison
Our series of experiments reveals considerable and consistent performance improvements over default implementations of deep learning through the use of our customized networks. This points towards the need to customize deep neural networks according to the unique characteristics of the underlying task.
In this paper, we refrained from evaluating performance on the basis of a single dataset and, instead, perform a holistic analysis, demonstrating that our customized networks outperformed the
Conclusion
Affective computing allows one to infer individual and collective emotional states from textual data and thus offers an anthropomorphic path for the provision of decision support. Even though deep learning has yielded considerable performance improvements for a variety of tasks in natural language processing, naïve network architectures struggle with the task of emotion recognition. As a remedy, several modifications are presented in this paper: namely, bidirectional processing, dropout
Acknowledgments
The authors gratefully acknowledge the financial support for Suzana Ilić from Prof. Kotaro Nakayama and Prof. Yutaka Matsuo, Graduate School of Engineering, University of Tokyo, Japan. This project was supported by a Grant-in-Aid for Scientific Research (New Academic Research Field) on "Research on the improvement of predictability by fusing deep learning and symbol processing" (16H06562).
Bernhard Kratzwald is a PhD student at the Chair of Management Information Systems at ETH Zurich. Previously, he has completed his Bachelor's and Master's studies in computer science at ETH Zurich and the Technical University of Vienna. His research focuses on applications of machine learning and statistics for natural language understanding, including but not limited to affective computing, question answer systems and chatbots.
References (90)
A constructivist view of emotion
Theories of emotion
(1980)- et al.
Detecting implicit expressions of emotion in text: a comparative analysis
Decision Support Systems
(2012) - et al.
Lexicon based feature extraction for emotion text classification
Pattern Recognition Letters
(2017) - et al.
Detecting variation of emotions in online activities
Expert Systems with Applications
(2017) - et al.
Emotion classification of YouTube videos
Decision Support Systems
(2017) - et al.
Explaining consumer satisfaction of services: the role of innovativeness and emotion in an electronic mediated environment
Decision Support Systems
(2015) - et al.
Emotion detection in suicide notes
Expert Systems with Applications
(2013) - et al.
The effects of positive affect and personal information search on outcomes in call centers: an empirical study
Decision Support Systems
(2012) - et al.
Survey on speech emotion recognition: features, classification schemes, and databases
Pattern Recognition
(2011) - et al.
Predicting process behaviour using deep learning
Decision Support Systems
(2017)
How (and where) does moral judgment work?
Trends in Cognitive Sciences
A Survey of event extraction methods from text for decision support systems
Decision Support Systems
Decision support from financial disclosures with deep neural networks and transfer learning
Decision Support Systems
The role of affect and cognition on online consumers' decision to disclose personal information to unfamiliar online vendors
Decision Support Systems
Deep neural networks understand investors better
Decision Support Systems
From once upon a time to happily ever after: tracking emotions in mail and books
Decision Support Systems
Sentiment, emotion, purpose, and style in electoral tweets
Information Processing & Management
A review of affective computing: from unimodal analysis to multimodal fusion
Information Fusion
EmoSenticSpace: a novel framework for affective common-sense reasoning
Knowledge-Based Systems
Facial expression recognition based on local binary patterns: a comprehensive study
Image and Vision Computing
From valence to emotions: exploring the distribution of emotions in online product reviews
Decision Support Systems
Web-based depression treatment: associations of clients' word use with adherence and outcome
Journal of Affective Disorders
Unsupervised emotion detection from text using semantic and syntactic relations
Applying sentiment and emotion analysis on brand tweets for digital marketing
Emotions from text
Affect in Text and Speech
The digitization of Healthcare: boundary risks, emotion, and consumer willingness to disclose personal health information
Information Systems Research
Exploring the dimensions of ad creativity
Psychology & Marketing
Cyber hate speech on Twitter: an application of machine classification and statistical modeling for policy and decision making
Policy & Internet
Affect detection: an interdisciplinary review of models, methods, and their applications
IEEE Transactions on Affective Computing
The hourglass of emotions
Using a heterogeneous dataset for emotion analysis in text
Form versus function: how the intensities of specific emotions evoked in functional versus hedonic trade-offs mediate product preferences
Journal of Marketing Research
Are they different? Affect, feeling, emotion, sentiment, and opinion detection in text
IEEE Transactions on Affective Computing
Feeler: emotion classification of text using vector space model
Introduction to the special issue: emotional states, attention, and working memory
Cognition & Emotion
Emotion, cognition, and behavior
Science
Psychological language on Twitter predicts county-level heart disease mortality
Psychological Science
Universals and cultural differences in the judgments of facial expressions of emotion
Journal of Personality and Social Psychology
Using millions of emoji occurrences to learn any-domain representations for detecting sentiment, emotion and sarcasm
The laws of emotion
American Psychologist
Widespread worry and the stock market
Prayas at EmoInt 2017: an ensemble of deep neural architectures for emotion intensity prediction in tweets
Harnessing the cloud of patient experience: using social media to detect poor quality healthcare
BMJ Quality & Safety
A Sentiment-and-Semantics-Based Approach for Emotion Detection in Textual Conversations
Cited by (0)
Bernhard Kratzwald is a PhD student at the Chair of Management Information Systems at ETH Zurich. Previously, he has completed his Bachelor's and Master's studies in computer science at ETH Zurich and the Technical University of Vienna. His research focuses on applications of machine learning and statistics for natural language understanding, including but not limited to affective computing, question answer systems and chatbots.
Suzana Ilić is a visiting researcher at the National Institute of Informatics, Tokyo. Previously she completed her Bachelor's and Master's studies in Applied Linguistics at Leopold-Franzens University Innsbruck. Her research focus on computational linguistics including sentiment analysis, affective computing and sarcasm detection in natural language.
Mathias Kraus is a PhD student at the Chair of Management Information Systems at ETH Zurich. Previously, he has completed his Bachelor's and Master's studies in computer science and mathematics at the Karlsruhe Institute of Technology. His research focuses on applications of machine learning and statistics for data analytics, with a focus on deep neural networks and Bayesian inference.
Stefan Feuerriegel is an assistant professor for management information systems at ETH Zurich. His research focuses on cognitive information systems and business intelligence, including text mining and sentiment analysis of financial news. Previously, he obtained his PhD from the University of Freiburg where he also worked as a research group leader at the Chair for Information Systems Research. He has co-authored research publications in the European Journal of Operational Research, the European Journal of Information Systems, the Journal of Information Technology and Decision Support Systems.
Helmut Prendinger is a professor at the National Institute of Informatics, Tokyo, where he works in the Digital Content and Media Sciences Research Division. He carries out research in the areas of 3D Internet, cyber social simulation, data analytics, virtual agents, intelligent multimodal interfaces, and emotion/attitude recognition from text. He has published more than 200 papers in peer-reviewed journals and conferences.