arXiv:2510.04064cs.AI2025-10被引 15

揭秘大模型如何存储与表达情绪,发现情绪信号早出现且持久。

Decoding Emotion in the Deep: A Systematic Study of How LLMs Represent, Retain, and Express Emotion

  • 用轻量探测器分析模型各层情绪表征,不修改参数。
  • 情绪信号在中间层最强,且能持续数百个词元。
  • 适合关注AI情绪理解与对齐的研究者和开发者。

大型语言模型(LLMs)被期待处理人类情感的细微差别。尽管研究证实其可模拟情感智能,但其内部情感机制仍不清晰。本文通过构建约40万条平衡七种基本情绪的Reddit语料库,利用轻量级探测器无损读取Qwen3和LLaMA系列模型隐藏层信息,探究情绪在模型中的编码方式、位置及持续时间。结果表明,大模型内部存在高度结构化的感情空间,随模型规模增强,显著优于零样本提示。情绪信号并非仅存在于输出层,而是在网络中间层达到峰值,且初始情感基调在后续数百个词元中仍可检测。此外,该状态受系统提示影响,具有可塑性。本文贡献了数据集、开源探测工具包及情绪分布图谱,为开发更透明、对齐的AI系统提供关键洞察。代码与数据已公开。

原文摘要 · Abstract (English)

Large Language Models (LLMs) are increasingly expected to navigate the nuances of human emotion. While research confirms that LLMs can simulate emotional intelligence, their internal emotional mechanisms remain largely unexplored. This paper investigates the latent emotional representations within modern LLMs by asking: how, where, and for how long is emotion encoded in their neural architecture? To address this, we introduce a novel, large-scale Reddit corpus of approximately 400,000 utterances, balanced across seven basic emotions through a multi-stage process of classification, rewriting, and synthetic generation. Using this dataset, we employ lightweight "probes" to read out information from the hidden layers of various Qwen3 and LLaMA models without altering their parameters. Our findings reveal that LLMs develop a surprisingly well-defined internal geometry of emotion, which sharpens with model scale and significantly outperforms zero-shot prompting. We demonstrate that this emotional signal is not a final-layer phenomenon but emerges early and peaks mid-network. Furthermore, the internal states are both malleable (they can be influenced by simple system prompts) and persistent, as the initial emotional tone remains detectable for hundreds of subsequent tokens. We contribute our dataset, an open-source probing toolkit, and a detailed map of the emotional landscape within LLMs, offering crucial insights for developing more transparent and aligned AI systems. The code and dataset are open-sourced.

情绪识别大模型内部机制探针分析

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。