LLaMAs Have Feelings Too: Unveiling Sentiment and Emotion Representations in LLaMA Models Through Probing
Not on the map. Why?
Abstract (arXiv)
Large Language Models (LLMs) have rapidly become central to NLP, demonstrating their ability to adapt to various tasks through prompting techniques, including sentiment analysis. However, we still have a limited understanding of how these models capture sentiment-related information. This study probes the hidden layers of Llama models to pinpoint where sentiment features are most represented and to assess how this affects sentiment analysis. Using probe classifiers, we analyze sentiment encoding across layers and scales, identifying the layers and pooling methods that best capture sentiment signals. Our results show that sentiment information is most concentrated in mid-layers for binary polarity tasks, with detection accuracy increasing up to 14% over prompting techniques. Additionally, we find that in decoder-only models, the last token is not consistently the most informative for sentiment encoding. Finally, this approach enables sentiment tasks to be performed with memory requirements reduced by an average of 57%. These insights contribute to a broader understanding of sentiment in LLMs, suggesting layer-specific probing as an effective approach for sentiment tasks beyond prompting, with potential to enhance model utility and reduce memory requirements.
Key facts. Cited by 15 papers in the map (data through 14 Oct 2026). Builds on 36 of its 79 references that are in the map. First posted on arXiv 22 May 2025.
Builds on
36 of 79 references.
References · 36
- 2017Attention Is All You Needcited by 60,361
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2024The Llama 3 Herd of Modelscited by 14,715
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,599
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,132
- 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,372
- 2019Optuna: A Next-generation Hyperparameter Optimization Frameworkcited by 2,501
- 2019Language Models as Knowledge Bases?cited by 1,936
- 2016Understanding intermediate layers using linear classifier probescited by 1,353
- 2023Representation Engineering: A Top-Down Approach to AI Transparencycited by 1,336
- 2023Inference-Time Intervention: Eliciting Truthful Answers from a Language Modelcited by 1,302
24 more
- 2021DeBERTaV3: Improving DeBERTa using ELECTRA-Style Pre-Training with Gradient-Disentangled Embedding Sharingcited by 1,254
- 2014Convolutional Neural Networks for Sentence Classificationcited by 1,127
- 2022Discovering Latent Knowledge in Language Models Without Supervisioncited by 767
- 2023The Geometry of Truth: Emergent Linear Structure in Large Language Model Representations of True/False Datasetscited by 712
- 2023Is ChatGPT a General-Purpose Natural Language Processing Task Solver?cited by 488
- 2023Larger language models do in-context learning differentlycited by 394
- 2019FinBERT: Financial Sentiment Analysis with Pre-trained Language Modelscited by 385
- 2023Sentiment Analysis in the Era of Large Language Models: A Reality Checkcited by 268
- 2020Probing Pretrained Language Models for Lexical Semanticscited by 156
- 2022TweetNLP: Cutting-Edge Natural Language Processing for Social Mediacited by 71
- 2023Eliciting Latent Knowledge from Quirky Language Modelscited by 62
- 2023Probing LLMs for hate speech detection: strengths and vulnerabilitiescited by 52
- 2024Designing Heterogeneous LLM Agents for Financial Sentiment Analysiscited by 48
- 2024A Language Model's Guide Through Latent Spacecited by 43
- 2024Probing the Emergence of Cross-lingual Alignment during LLM Trainingcited by 39
- 2023Towards Understanding In-Context Learning with Contrastive Demonstrations and Saliency Mapscited by 35
- 2023Transforming Sentiment Analysis in the Financial Domain with ChatGPTcited by 25
- 2023Zero- and Few-Shot Prompting with LLMs: A Comparative Study with Fine-tuned Models for Bangla Sentiment Analysiscited by 20
- 2023Is Bigger and Deeper Always Better? Probing LLaMA Across Scales and Layerscited by 20
- 2019Probing for Semantic Classes: Diagnosing the Meaning Content of Word Embeddingscited by 15
- 2023Do PLMs Know and Understand Ontological Knowledge?cited by 13
- 2025Do LLMs Memorize Recommendation Datasets? A Preliminary Study on MovieLens-1Mcited by 12
- 2025Reassessing the Role of Chain-of-Thought in Sentiment Analysis: Insights and Limitationscited by 3
- 2024Do LLMs Think Fast and Slow? A Causal Study on Sentiment Analysiscited by 2
Built on by
Citing papers per year: 2025: 1; 2026: 14.
15 papers.
Sort:
By area:
- 2026Rethinking LLM-as-a-Judge: Representation-as-a-Judge with Small Language Models via Semantic Capacity Asymmetrycited by 8
- 2026Eliciting Numerical Predictive Distributions of LLMs Without Autoregressioncited by 6
- 2026Do Emotions Influence Moral Judgment in Large Language Models?cited by 2
- 2026How Tokenization Limits Phonological Knowledge Representation in Language Models and How to Improve Themcited by 1
- 2026Why Are Some Emotions Harder for LLMs? Uncovering the Causal Mechanisms of Emotion Inference via Sparse Autoencoderscited by 1
- 2026STEREODISCO: Discovering Stereotypicality in LLMscited by 1
- 2026Exploring Diversity, Novelty, and Popularity Bias in ChatGPT's Recommendationscited by 0
- 2026Exploring Approaches for Detecting Memorization of Recommender System Data in Large Language Modelscited by 0
- 2025Do You Trust Me? Cognitive-Affective Signatures of Trustworthiness in Large Language Modelscited by 0
- 2026A BERTology View of LLM Orchestrations: Token- and Layer-Selective Probes for Efficient Single-Pass Classificationcited by 0
- 2026RUVA: Personalized Transparent On-Device Graph Reasoningcited by 0
- 2026Are Emotion and Rhetoric Neurons in LLM? Neuron Recognition and Adaptive Masking for Emotion-Rhetoric Prediction Steeringcited by 0
- 2026Usage-Modulated Sentiment Representations in Large Language Models4 Oct 2026
- 2026Interpretable Symptom Vectors for Depression in a Large Language Model1 Sep 2026
- 2026Some Emotions Run Deeper: Layer-wise Probing and Causal Intervention in Large Language Models1 Sep 2026
- 2026STEREODISCO: Discovering Stereotypicality in LLMs30 Jul 2026
- 2026Why Are Some Emotions Harder for LLMs? Uncovering the Causal Mechanisms of Emotion Inference via Sparse Autoencoders28 Apr 2026
- 2026Do Emotions Influence Moral Judgment in Large Language Models?21 Apr 2026
- 2026Are Emotion and Rhetoric Neurons in LLM? Neuron Recognition and Adaptive Masking for Emotion-Rhetoric Prediction Steering19 Apr 2026
- 2026How Tokenization Limits Phonological Knowledge Representation in Language Models and How to Improve Them18 Apr 2026
- 2026Eliciting Numerical Predictive Distributions of LLMs Without Autoregression3 Mar 2026
- 2026RUVA: Personalized Transparent On-Device Graph Reasoning17 Feb 2026
- 2026Rethinking LLM-as-a-Judge: Representation-as-a-Judge with Small Language Models via Semantic Capacity Asymmetry30 Jan 2026
- 2026A BERTology View of LLM Orchestrations: Token- and Layer-Selective Probes for Efficient Single-Pass Classification19 Jan 2026
3 more
- 2026Exploring Approaches for Detecting Memorization of Recommender System Data in Large Language Models5 Jan 2026
- 2026Exploring Diversity, Novelty, and Popularity Bias in ChatGPT's Recommendations5 Jan 2026
- 2025Do You Trust Me? Cognitive-Affective Signatures of Trustworthiness in Large Language Models17 Dec 2025
- 2026RUVA: Personalized Transparent On-Device Graph Reasoningcited by 0
- 2026RUVA: Personalized Transparent On-Device Graph Reasoning17 Feb 2026
- 2026Eliciting Numerical Predictive Distributions of LLMs Without Autoregressioncited by 6
- 2026Do Emotions Influence Moral Judgment in Large Language Models?cited by 2
- 2026How Tokenization Limits Phonological Knowledge Representation in Language Models and How to Improve Themcited by 1
- 2026STEREODISCO: Discovering Stereotypicality in LLMscited by 1
- 2026Exploring Diversity, Novelty, and Popularity Bias in ChatGPT's Recommendationscited by 0
- 2025Do You Trust Me? Cognitive-Affective Signatures of Trustworthiness in Large Language Modelscited by 0
- 2026A BERTology View of LLM Orchestrations: Token- and Layer-Selective Probes for Efficient Single-Pass Classificationcited by 0
- 2026Some Emotions Run Deeper: Layer-wise Probing and Causal Intervention in Large Language Modelscited by 0
- 2026Interpretable Symptom Vectors for Depression in a Large Language Modelcited by 0
- 2026Usage-Modulated Sentiment Representations in Large Language Modelscited by 0
- 2026Usage-Modulated Sentiment Representations in Large Language Models4 Oct 2026
- 2026Interpretable Symptom Vectors for Depression in a Large Language Model1 Sep 2026
- 2026Some Emotions Run Deeper: Layer-wise Probing and Causal Intervention in Large Language Models1 Sep 2026
- 2026STEREODISCO: Discovering Stereotypicality in LLMs30 Jul 2026
- 2026Do Emotions Influence Moral Judgment in Large Language Models?21 Apr 2026
- 2026How Tokenization Limits Phonological Knowledge Representation in Language Models and How to Improve Them18 Apr 2026
- 2026Eliciting Numerical Predictive Distributions of LLMs Without Autoregression3 Mar 2026
- 2026A BERTology View of LLM Orchestrations: Token- and Layer-Selective Probes for Efficient Single-Pass Classification19 Jan 2026
- 2026Exploring Diversity, Novelty, and Popularity Bias in ChatGPT's Recommendations5 Jan 2026
- 2025Do You Trust Me? Cognitive-Affective Signatures of Trustworthiness in Large Language Models17 Dec 2025