Compression of Emotion in Language Model Representations
Organizations: Stanford University · Tel Aviv University
Abstract
Large language models (LLMs) have been evaluated on their ability to identify emotions expressed in text and produce fluent emotional language. However, output predictions alone do not reveal how fine-grained emotion distinctions are organized internally. We study seven LLMs on GoEmotions, an English Reddit dataset annotated with 27 fine-grained emotion categories plus neutral. We compare model predictions and emotion-prompted final-token representations with the 28 GoEmotions categories and with coarser emotion-family and sentiment groupings. We find a consistent pattern of relative to the fine-grained GoEmotions taxonomy. Under the tested KMeans protocol, when we cluster their hidden representations without using emotion labels, the clearest split is into two groups that largely separate positive from negative emotion. Coarser emotion groupings are also recovered with fewer clusters than the full 28-category taxonomy. Yet linear probes retain substantial fine-grained predictive information. These results suggest that fine-grained emotion information remains accessible even though broader affective structure more strongly organizes the unsupervised geometry.
Figures & tables
| Model | 28-way, no list | 28-way, list | 7-way | 4-way sentiment |
| Llama-3.2-1B | 0.089 (49.3) | 0.055 (19.4) | 0.113 (5.1) | 0.219 (0.0) |
| Llama-3.2-3B | 0.127 (20.7) | 0.225 (1.9) | 0.338 (1.3) | 0.357 (0.0) |
| Llama-3.1-8B | 0.201 (28.6) | 0.242 (1.6) | 0.335 (0.2) | 0.351 (0.0) |
| Gemma-2-2B | 0.136 (22.7) | 0.208 (1.0) | 0.329 (2.0) | 0.410 (0.5) |
| Gemma-2-9B | 0.155 (36.5) | 0.250 (1.5) | 0.347 (0.8) | 0.413 (0.1) |
| Qwen2.5-3B | 0.167 (18.9) | 0.245 (17.5) | 0.349 (3.1) | 0.433 (0.0) |
| Model | 28-way | 7-way | 4-way |
| Llama-3.2-1B | 0.376 | 0.540 | 0.632 |
| Llama-3.2-3B | 0.404 | 0.556 | 0.638 |
| Llama-3.1-8B | 0.378 | 0.524 | 0.642 |
| Gemma-2-2B | 0.368 | 0.520 | 0.629 |
| Gemma-2-9B | 0.360 | 0.524 | 0.625 |
| Qwen2.5-3B | 0.365 | 0.514 | 0.623 |
Appendix figures & tables9 assets
Supplementary material from the paper’s appendix.
Appendix
| Condition | Text only | Emotion prompt |
| 28-way, no list | .106 | .171 |
| 28-way, list given | .106 | .135 |
| 7-way | .070 | .104 |
| 4-way sentiment | .056 | .129 |
| Condition | Final Pos | Text mean | FP mean |
| 28-way, no list | .171 | .045 | .042 |
| 4-way sentiment | .129 | .010 | .003 |
| Model | 28-way, no list | 28-way, list | 7-way | 4-way sentiment |
| Llama-3.2-1B | .089 | .055 | .113 | .219 |
| Llama-3.2-3B | .127 | .225 | .338 | .357 |
| Llama-3.1-8B | .201 | .242 | .335 | .351 |
| Gemma-2-2B | .136 | .208 | .329 | .410 |
| Gemma-2-9B | .155 | .250 | .347 | .413 |
| Qwen2.5-3B | .167 | .245 | .349 | .433 |
| Model | 28-way, no list | 28-way, list | 7-way | 4-way sentiment |
| Llama-3.2-1B | 49.3 | 19.4 | 5.1 | 0.0 |
| Llama-3.2-3B | 20.7 | 1.9 | 1.3 | 0.0 |
| Llama-3.1-8B | 28.6 | 1.6 | 0.2 | 0.0 |
| Gemma-2-2B | 22.7 | 1.0 | 2.0 | 0.5 |
| Gemma-2-9B | 36.5 | 1.5 | 0.8 | 0.1 |
| Qwen2.5-3B | 18.9 | 17.5 | 3.1 | 0.0 |
| Model | Direct 7-way | Direct 4-way | ||
| Llama-3.2-3B | .338 | .334 | .357 | .376 |
| Llama-3.1-8B | .335 | .375 | .351 | .438 |
| Gemma-2-2B | .329 | .371 | .410 | .488 |
| Gemma-2-9B | .347 | .370 | .413 | .440 |
| Qwen2.5-3B | .349 | .357 | .433 | .398 |
| Qwen2.5-7B | .366 | .360 | .409 | .433 |
| Model | Valence AMI | Balanced Acc. | 4-way Cramér’s | Cross-seed ARI |
| Llama-3.2-1B | .263 | .798 | .430 | .779 |
| Llama-3.2-3B | .248 | .783 | .449 | .685 |
| Llama-3.1-8B | .263 | .799 | .449 | .837 |
| Gemma-2-2B | .313 | .812 | .496 | .992 |
| Gemma-2-9B | .289 | .802 | .479 | .926 |
| Qwen2.5-3B | .352 | .837 | .509 | .948 |
| Model | Pair-weighted gap | Equal-family gap |
| Llama-3.2-1B | .025 | .077 |
| Llama-3.2-3B | .020 | .060 |
| Llama-3.1-8B | .026 | .078 |
| Gemma-2-2B | .026 | .092 |
| Gemma-2-9B | .030 | .062 |
| Qwen2.5-3B | .029 | .072 |
| Model | 28-way | 7-way | 4-way |
| Llama-3.2-1B | 17 | 3 | 2 |
| Llama-3.2-3B | 13 | 4 | 3 |
| Llama-3.1-8B | 15 | 4 | 4 |
| Gemma-2-2B | 14 | 4 | 2 |
| Gemma-2-9B | 15 | 6 | 2 |
| Qwen2.5-3B | 13 | 3 | 3 |
Emotion Representation in Language Models
Emotion representation in language models studies how models encode, interpret, and use affective concepts such as valence, arousal, and empathy.
See all 69 papers