中文

LLaMAs 也会有感受:通过探针揭示 LLaMA 模型中的情感与情绪表示

计算与语言 2025-06-02 v2 人工智能

摘要

大型语言模型( LLMs) rapidly 成为 NLP 的核心,demonstrating their ability to adapt to various tasks through prompting techniques,including sentiment analysis。然而,我们仍对这些模型如何捕获情感相关信息有 limited understanding。本研究通过探针分析 Llama 模型的隐藏层,确定情感特征最常被表示的层位置,并评估这对情感分析的影响。使用 probe classifier,我们分析了不同层和规模下的情感编码,识别出最能捕获情感信号的层和池化方法。我们的结果表明,对于二元极性任务,情感信息最集中于中间层,检测准确率相对于提示技术提升最高可达 14%。此外,我们发现在 decoder-only 模型中,最后一个标记并不 consistently 是情感编码最具信息性的。最后,这种方法使情感任务的内存需求平均降低 57%。这些见解 contribute to 更广泛地理解 LLMs 中的情感,表明基于层的探针是情感任务的有效方法,超越提示技术,potentially enhance model utility and reduce memory requirements。

关键词

引用

@article{arxiv.2505.16491,
  title  = {LLaMAs Have Feelings Too: Unveiling Sentiment and Emotion Representations in LLaMA Models Through Probing},
  author = {Dario Di Palma and Alessandro De Bellis and Giovanni Servedio and Vito Walter Anelli and Fedelucio Narducci and Tommaso Di Noia},
  journal= {arXiv preprint arXiv:2505.16491},
  year   = {2025}
}