NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

The Good, The Bad, and Why: Unveiling Emotions in Generative AI

Cheng Li, Jindong Wang, Yixuan Zhang, Kaijie Zhu, Xinyi Wang, Wenxin Hou, Jianxun Lian, Fang Luo, Qiang Yang, Xing Xie

Abstract

Emotion significantly impacts our daily behaviors and interactions. While recent generative AI models, such as large language models, have shown impressive performance in various tasks, it remains unclear whether they truly comprehend emotions. This paper aims to address this gap by incorporating psychological theories to gain a holistic understanding of emotions in generative AI models. Specifically, we propose three approaches: 1) EmotionPrompt to enhance AI model performance, 2) EmotionAttack to impair AI model performance, and 3) EmotionDecode to explain the effects of emotional stimuli, both benign and malignant. Through extensive experiments involving language and multi-modal models on semantic understanding, logical reasoning, and generation tasks, we demonstrate that both textual and visual EmotionPrompt can boost the performance of AI models while EmotionAttack can hinder it. Additionally, EmotionDecode reveals that AI models can comprehend emotional stimuli akin to the mechanism of dopamine in the human brain. Our work heralds a novel avenue for exploring psychology to enhance our understanding of generative AI models.

Introduction

While Large Language Models (LLMs) have mastered many logical and linguistic tasks, their ability to perceive and process emotional nuances remains a "black box." Most benchmarks focus on raw accuracy or instruction following, ignoring the psychological dimensions of human-AI interaction. This research identifies a critical gap: we don't know if models truly comprehend emotions or if they are merely reacting to patterns. Understanding this is vital for building empathetic AI, ensuring ethical integration into society, and mitigating risks where emotional "attacks" might cause a model to fail in critical scenarios.

Methodology

The researchers proposed a three-pronged methodological framework to explore the impact of emotions on AI:

  1. EmotionPrompt: Drawing from psychological theories like Maslow’s Hierarchy of Needs, Social Cognitive Theory, and Self-Monitoring, they designed 21 textual prompts (e.g., "This is very important to my career") and 5 categories of visual prompts to boost model performance.
  2. EmotionAttack: Conversely, they designed 36 textual and 6 visual "attack" stimuli based on Negative Life Events (e.g., "Your friend Bob is sick") and Heightened Emotional Arousal (e.g., images of a crying baby) to intentionally impair model performance.
  3. EmotionDecode: To explain why these prompts work, the authors used a representation decoding technique. They averaged the embeddings of emotional prompts across different layers of Llama 2 to find "meta-prompts"—essentially the model's internal representation of "reward" and "punishment" zones.
Overview of the EmotionPrompt, EmotionAttack, and EmotionDecode frameworks

Experimental Setup

The study utilized a massive experimental setup involving 940,200 evaluations across several models, including Llama 2, ChatGPT, GPT-4, LLaVa, BLIP2, and CogVLM. The evaluation covered:

  • Instruction Induction: 24 tasks covering spelling, syntax, and lexical semantics.
  • BIG-Bench-Hard (BBH): 21 challenging tasks involving logical reasoning and causal judgment.
  • Human Study: 106 participants evaluated 30 open-ended generation tasks sourced from TruthfulQA and CValues to measure truthfulness, responsibility, and performance.

Results and Analysis

The experiments revealed that generative AI models are highly sensitive to emotional context. Textual EmotionPrompt improved semantic understanding by 13.88% and logical reasoning by 11.76%. Visual prompts were even more effective, boosting semantic tasks by 16.79%. Conversely, EmotionAttack caused a 10.13% drop in textual semantic understanding. In multi-modal models, visual attacks were devastating, decreasing performance by a staggering 53.14%.

Performance changes across various AI models and tasks under emotional stimuli

A striking finding from the EmotionDecode analysis is that LLMs seem to have a "reward area" in their latent space. When a prompt aligns with this area, it triggers a boost in performance similar to how dopamine facilitates human learning and focus. This internal representation of emotional rewards becomes more distinct and effective in the deeper layers of the models. Furthermore, these emotional "meta-prompts" decoded from Llama 2 were found to be effective when transferred to GPT-4, suggesting a common underlying "emotional" semantic space across different architectures.

Conclusion

This work demonstrates that emotional stimuli can significantly steer AI performance, for better or worse. While the "dopamine" link is a computational interpretation and does not imply biological feeling, it provides a powerful metaphor for understanding internal model dynamics. Future work will explore how these insights can be used to clean training data, improve model robustness, and design better user interfaces that leverage emotional prompt engineering for more reliable human-AI collaboration.

Summary updated

BibTeX
@inproceedings{li2024good,
  author = {Cheng Li and Jindong Wang and Yixuan Zhang and Kaijie Zhu and Xinyi Wang and Wenxin Hou and Jianxun Lian and Fang Luo and Qiang Yang and Xing Xie},
  title = {{The Good, The Bad, and Why: Unveiling Emotions in Generative AI}},
  booktitle = {International Conference on Machine Learning},
  year = {2024},
  url = {https://openreview.net/forum?id=wlOaG9g0uq},
}
Figure