From Rational Answers to Emotional Resonance: The Role of Controllable Emotion Generation in Language Models
Dong, Jin, Yang et al.
Purpose: Emotion is a fundamental component of human communication, shaping understanding, trust, and engagement across domains such as education, healthcare, and mental health. While large language models (LLMs) exhibit strong reasoning and knowledge generation capabilities, they still struggle to express emotions in a consistent, controllable, and contextually appropriate manner. This limitation restricts their potential for authentic human-AI interaction. Methods: We propose a controllable emotion generation framework based on Emotion Vectors (EVs) - latent representations derived from internal activation shifts between neutral and emotion-conditioned responses. By injecting these vectors into the hidden states of pretrained LLMs during inference, our method enables fine-grained, continuous modulation of emotional tone without any additional training or architectural modification. We further provide theoretical analysis proving that EV steering enhances emotional expressivity while maintaining semantic fidelity and linguistic fluency. Results: Extensive experiments across multiple LLM families show that the proposed approach achieves consistent emotional alignment, stable topic adherence, and controllable affect intensity. Compared with existing prompt-based and fine-tuning-based baselines, our method demonstrates superior flexibility and generalizability. Conclusion: Emotion Vector (EV) steering provides an efficient and interpretable means of bridging rational reasoning and affective understanding in large language models, offering a promising direction for building emotionally resonant AI systems capable of more natural human-machine interaction.
academic
From Rational Answers to Emotional Resonance: The Role of Controllable Emotion Generation in Language Models
This paper addresses the limitations of large language models (LLMs) in emotional expression by proposing a controllable emotion generation framework based on Emotion Vectors (EVs). The method constructs latent representations by extracting internal activation differences between neutral and emotion-conditioned responses, and injects these vectors into the hidden states of pretrained LLMs during inference to achieve fine-grained continuous modulation of emotional tone without requiring additional training or architectural modifications. Theoretical analysis demonstrates that EV guidance enhances emotional expressiveness while maintaining semantic fidelity and linguistic fluency.
Although current large language models excel at reasoning and knowledge generation, they exhibit significant limitations in emotional expression:
Inconsistent Emotional Expression: Model-generated content is either emotionally neutral, tonally inconsistent, or emotionally uncontrollable
Lack of Emotional Intelligence: In domains such as education, healthcare, and mental health, purely factual yet emotionally cold responses often fail to meet user expectations
Limited Application Scenarios: The deficiency in emotional expression capability restricts the application of AI systems in human-computer interaction scenarios requiring emotional resonance
Emotion is a fundamental component of human communication, playing crucial roles in multiple critical domains:
Education: Teacher encouragement and patience significantly influence student motivation and persistence
Healthcare: Physician emotional engagement and empathetic communication improve patient compliance, satisfaction, and even clinical recovery trajectories
Mental Health: Emotional resonance capability is a prerequisite for providing meaningful support
Instruction Tuning Methods: Often lack flexibility and struggle to adapt to diverse applications and model architectures
Prompting Strategies: Depend on carefully designed templates and external evaluation modules
Inference-Time Vector Editing: Primarily focus on the last token position, lack global significance, and are difficult to apply to tasks requiring high generalizability such as emotion
Proposed a controllable emotion generation framework based on Emotion Vectors (EV): Extracts reusable and efficient emotion vectors by comparing model responses to emotion-induced and neutral prompts
Achieved unsupervised, highly robust emotion control: Without requiring training or architectural changes, with global consistency
Provided rigorous theoretical analysis: Demonstrates that EV guidance enhances emotional expression while maintaining semantic fidelity
Constructed specialized evaluation datasets: EmotionQuery and EmotionQuery+ datasets for emotion generation assessment
Enabled continuous fine-grained control: Provides continuous fine-grained control over emotional intensity through scalar scaling, supporting broad applicability across model families
Given a pretrained language model M and a target emotional state e ∈ {joy, anger, disgust, fear, sadness}, the task objective is to control the emotional tone of generated text by modifying the model's internal representations during inference, while maintaining semantic content and linguistic fluency.
Emotion Probability Score: After applying 2×EV, most models show significant improvement in EPS, such as Llama3.1, Qwen2, MiniCPM reaching 1.000, 0.9825, 0.9950
Emotion Absolute Score: After applying 1×EV, most models' EAS increases by at least 400%, while -1×EV reduces EAS by nearly 90%
The paper provides rigorous theoretical proofs based on first-order Taylor expansion:
Monotonic Emotion Gain: If the Fisher discriminant direction aligns with EV on average, small positive α monotonically increases target emotion scores
Semantic Preservation: Since EV is constructed from semantically identical but emotionally different prompt pairs, its projection onto semantic gradients approximates zero
Linear Controllability: Linear dependence of emotional intensity on α, with multi-emotion additive composability
In the sense of Fisher Linear Discriminant Analysis, EV construction approaches statistical optimality: under whitening approximation, the optimal Fisher direction is parallel to the mean difference vector.
EV Guidance Provides an Efficient and Interpretable Method: Bridges rational reasoning and emotional understanding in large language models
Achieves Fine-Grained Emotion Control: Enables continuous, controllable emotional adjustment without additional training
Maintains Semantic Fidelity: Both theory and experiments demonstrate that the method enhances emotional expression while maintaining semantic consistency
The paper cites abundant related research, primarily including:
Emotion Theory Foundations: Ekman's basic emotion model
Large Language Models: Mainstream models such as Llama and Qwen series
Emotion Computing: MNLI model for emotion classification
Vector Editing: Related inference-time intervention methods
Overall Assessment: This is a high-quality research paper proposing an innovative emotion vector guidance method with solid theoretical foundations and comprehensive experimental validation. This work provides an effective technical pathway for constructing AI systems with greater emotional intelligence, possessing significant academic value and practical significance.