Deep learning for affective computing: Text-based emotion recognition in decision support

Bernhard Kratzwald, Suzana Ilic, Mathias Kraus, Stefan Feuerriegel, Helmut Prendinger · DOI

Introduction

As artificial intelligence becomes more integrated into human decision-making processes, the need for "emotionally intelligent" systems—a field known as affective computing—has grown. While sentiment analysis (classifying text as positive or negative) is relatively mature, detecting specific emotions such as joy, anger, or trust is significantly more complex. This paper explores how customized deep learning architectures can overcome the inherent hurdles of text-based emotion recognition, achieving performance gains of up to 23% over traditional machine learning baselines.

The Challenges of Emotion Recognition

The authors identify three primary obstacles that have historically limited the effectiveness of emotion recognition in text:

  1. Linguistic Complexity: Emotions are frequently conveyed through subtle, ambiguous language where context is paramount.
  2. Data Scarcity: High-quality, labeled datasets for specific emotions are often small, frequently containing fewer than 2,000 samples, compared to the millions available for general sentiment analysis.
  3. Class Imbalance: In real-world datasets, certain emotions appear far more frequently than others. Standard models often fall into the "majority vote" trap, where they achieve high accuracy simply by ignoring rare classes.

Methodology and the sent2affect Approach

To address these challenges, the researchers moved beyond traditional models like Random Forests and Support Vector Machines (SVMs) to implement a specialized deep learning pipeline centered on Bidirectional Long Short-Term Memory (BiLSTM) networks.

Architectural Innovations

  • Bidirectionality: Unlike unidirectional models, BiLSTMs process text in both forward and backward directions. This is critical for emotion recognition, where the end of a sentence (e.g., "...but then I lost it") can completely invert the emotional context of the beginning.
  • Regularization and Weighting: To combat overfitting on small datasets, the authors utilized aggressive dropout layers. Furthermore, they implemented weighted loss functions that penalize errors on rare emotions more heavily, forcing the model to learn features for infrequent classes like disgust or surprise.

Transfer Learning: sent2affect

The study's most significant contribution is sent2affect, a tailored transfer learning strategy. Given the scarcity of emotion-labeled data, the authors first pre-trained their network on a massive sentiment analysis dataset (over 100,000 tweets). By "borrowing" the linguistic features learned during sentiment classification and fine-tuning them on specific emotion tasks, the model develops a foundational understanding of the "language of feeling" before tackling granular labels.

Experimental Datasets

The approach was validated across six diverse benchmark datasets, representing various linguistic styles and emotional frameworks.

As shown in the table above, the datasets range from formal newspaper headlines and literary tales to noisy social media posts from Twitter and Facebook. This diversity ensures that the model's performance is not a result of domain-specific artifacts.

Key Results and Insights

The customized deep learning approach consistently outperformed traditional machine learning across all benchmarks:

  • Classification Performance: The researchers observed an improvement of up to 23.2% in F1-score, demonstrating the model's robustness even in the presence of class imbalance.
  • Regression Accuracy: For tasks requiring the prediction of emotional intensity (valence and arousal), the model achieved an 11.6% reduction in Mean Squared Error (MSE).
  • The Power of Pre-training: The sent2affect method provided the most substantial boosts on the smallest and noisiest datasets, confirming that sentiment-based pre-training is a viable solution for data-scarce affective computing tasks.

Conclusion and Future Directions

While this research marks a significant step forward, the authors note that the field still faces a "bottleneck" regarding dataset size and standardization. Different datasets often use conflicting emotion models (e.g., Ekman’s 6 basic emotions vs. Plutchik’s 8), making cross-study comparisons difficult. Future work should focus on creating larger, standardized corpora and improving domain adaptation to help models trained on formal text better understand the informal, evolving language of social media.

Summary updated

BibTeX
@article{kratzwald2018deep,
  author = {Bernhard Kratzwald and Suzana Ilic and Mathias Kraus and Stefan Feuerriegel and Helmut Prendinger},
  title = {{Deep learning for affective computing: Text-based emotion recognition in decision support}},
  journal = {Decis. Support Syst.},
  year = {2018},
  doi = {10.1016/j.dss.2018.09.002},
}
Figure