Mixed Feelings: Natural Text Generation with Variable, Coexistent Affective Categories

Lee KezarACL 2018

Abstract

Traditional approaches to emotional natural language generation (NLG) often treat affect as a set of discrete, mutually exclusive categories. This limitation prevents conversational agents from expressing the nuanced, blended emotional states characteristic of human communication. This paper proposes a novel framework using Long Short-Term Memory (LSTM) networks that treats emotions as a continuous, multi-dimensional vector space. By mapping vocabulary to emotional coordinates via the DepecheMood lexicon and employing an inverse distance function for word selection, the model can generate text that reflects complex emotional mixtures. Furthermore, the implementation of a QuadTree optimization and an emotional decay function ensures both computational efficiency and linguistic naturalness.

Introduction

In the pursuit of creating more empathetic and human-like conversational agents, researchers have increasingly focused on integrating "affect" into language models. However, current state-of-the-art models suffer from two primary constraints: the use of discrete emotional "buckets" (e.g., a sentence is either "happy" or "sad") and a lack of granular intensity control. Human feelings are rarely so binary; they are often a messy blur of multiple categories. Without the ability to perform "affective mixing," AI systems risk overreacting—switching abruptly between emotional extremes rather than transitioning gradually or expressing complex states like cautious optimism or bittersweetness.

Methodology

The proposed framework by Lee Kezar utilizes an LSTM-based language model enhanced by a multi-dimensional emotional vector to guide word selection.

The Affective Vector ($e$)

Instead of a single categorical label, the model utilizes a quadruple of values representing the intensity (ranging from 0 to 1) of four core emotions: joy, sadness, fear, and anger. This vector serves as the target emotional state for the generated output.

Word Selection and Lexicon Mapping

To select the next word in a sequence, the model maps its entire vocabulary into a 4D emotional space using the DepecheMood lexicon. This lexicon is unique because it provides continuous scores across emotional dimensions rather than binary labels. The model employs an Inverse Distance Function to calculate the proximity between the target affective vector and the emotional valence of potential words. Words that are "closer" to the desired emotional mix are assigned a higher probability of selection, balancing emotional intent with grammatical likelihood.

Computational Optimization

Calculating the emotional distance for every word in a large vocabulary is computationally expensive ($O(n)$). To facilitate real-time generation, the paper suggests using a QuadTree algorithm. This spatial indexing method reduces the search complexity to $O(\log n)$, significantly decreasing latency without sacrificing the nuance of the emotional mapping.

Emotion Dynamics and Decay

Natural human expression typically involves a peak of emotional signaling followed by a return to a baseline. To prevent the model from "over-emphasizing" an emotion—such as forcing a "happy" word into every available slot—the framework implements a decay function. As emotional words are selected, the target intensity for that specific emotion decreases slightly for the remainder of the sentence, mimicking the natural ebb and flow of affective expression.

Data Sources

The model relies on two primary datasets:

  1. DepecheMood: A high-quality lexicon of over 13,500 words. Its continuous scoring system is essential for the "mixing" capabilities of the model.
  2. Ubuntu Dialogue Corpus: This large-scale dataset of dyadic (two-person) conversations serves as the training ground for the underlying language model, providing a foundation for natural conversational flow.

Key Insights

Emotion as a Precursor to Language

Drawing on psychological models, such as those by Carroll Izard, the paper posits that feelings exist as cognitive states before they are symbolized into words. By setting an emotional target vector before generation begins, the model mimics this cognitive sequence.

Complex Emotions as Blends

A significant finding of this research is the emergence of complex emotions from simple gradients. For example, by shifting a vector from high joy/low fear toward moderate joy/high fear, the model’s output transitions from "I am happy to go" to "I am anxious to go." This suggests that "anxiety" can be effectively modeled as a specific intersection of simpler emotional dimensions.

Personality Modeling

The author suggests that AI "personality" can be defined as a default emotional state. An optimistic bot, for instance, might have a permanent minimum "joy" value within its affective vector, ensuring its responses consistently hover near a specific set of emotional coordinates.

Results and Future Work

As a research proposal, the current findings are primarily architectural and qualitative. The model successfully demonstrates a linguistic transition across emotional spectrums (e.g., Happy → Content → Hesitant → Worried → Nervous → Anxious).

Future work will focus on several key areas:

  • Quantitative Evaluation: Implementing human-in-the-loop testing via Amazon Mechanical Turk to rate the accuracy of generated emotions on a Likert scale.
  • Expanding Dimensions: Incorporating additional dimensions from DepecheMood, such as "Amusement" or "Annoyance," to provide even greater granularity.
  • Grammatical Balancing: Refining the weights between emotional "bias" and grammatical correctness to ensure that the drive for emotional expression does not degrade the structural integrity of the generated sentences.

Summary updated

BibTeX
@inproceedings{kezar2018mixed,
  author = {Lee Kezar},
  title = {{Mixed Feelings: Natural Text Generation with Variable, Coexistent Affective Categories}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2018},
  doi = {10.18653/v1/p18-3020},
}
Figure