Quantifying the Affective Gap: A Zero-Shot Evaluation of LLMs on Fine-Grained Emotion Taxonomies


Abstract

Emotion recognition in natural language is a foundational challenge in affective computing, with critical implications for human-computer interaction, mental health support, and conversational AI. This paper presents a rigorous, unified zero-shot evaluation of three leading commercial large language models: Claude (claude-sonnet-4-6), ChatGPT (GPT-5.4), and Gemini (gemini-2.5-flash). The models were queried through their respective production APIs as of April 2026 on a fine-grained 13-class emotion classification task. Using a stratified 1,000-sentence sample from the boltuix/emotions-dataset comprising 131,306 sentences across 13 categories, a single uniform prompt with no exemplars was applied identically across all models. Gemini achieves the highest accuracy (39.9%) and macro-F1 (0.363), followed by GPT-5.4 (38.8%, F1 = 0.291) and Claude (38.0%, F1 = 0.159). All models excel on sarcasm and desire while consistently failing on love, confusion, and shame. McNemar’s tests reveal no statistically significant pairwise differences (\(p>0.10\)), suggesting convergence at a shared zero-shot ceiling. Claude’s markedly lower macro-F1 exposes a class-imbalance prediction bias. These findings highlight the current limitations of frontier AI systems in zero-shot fine-grained emotion classification.

emotion classification, affective computing, LLMs, zero-shot learning, NLP, GPT-5.4, Claude, Gemini, AI, human-computer interaction

1 Introduction↩︎

Emotions shape human communication and underpin high-stakes applications including mental health monitoring [1], empathetic dialogue systems [2], and human-computer interaction. The ability of an AI system to recognize affective states is therefore a prerequisite for deployment in any domain where human welfare is at stake.

Despite rapid advances in large language models (LLMs), their affective intelligence remains poorly characterized at fine-grained resolution. Most studies probe coarse polarity or the Ekman six basic emotions [3] rather than richer taxonomies [4], [5], and direct cross-provider comparisons under identical experimental conditions are absent from the literature. This gap matters: practitioners selecting an API for emotion-aware applications must rely on ad hoc or proprietary benchmarks that may not reflect real-world linguistic diversity.

This paper addresses the gap through four research questions: zero-shot accuracy across 13 classes (RQ1); pairwise statistical differences using McNemar’s test (RQ2); per-class strengths and failure modes (RQ3); and the effect of sentence length on accuracy (RQ4). We contribute (i) the first direct zero-shot comparison of Claude (claude-sonnet-4-6), ChatGPT (GPT-5.4), and Gemini (gemini-2.5-flash) on a 13-class task using production APIs as of April 2026; (ii) per-emotion accuracy breakdowns revealing systematic failure modes; (iii) McNemar significance testing; and (iv) a sentence-length moderation analysis.

2 Related Work↩︎

2.1 Emotion Classification and Datasets↩︎

Computational emotion recognition has progressed from lexicon-based resources such as the NRC Lexicon [6] and SemEval affective tasks [7][9] through deep learning classifiers to transformer fine-tuning paradigms achieving state-of-the-art results on benchmarks including GoEmotions [10] (58K comments, 27 categories). BERT [11], [12] and RoBERTa [13] established the transformer paradigm as dominant for supervised emotion classification. The boltuix/emotions-dataset extends the Ekman taxonomy with social (shame, guilt) [14], cognitive (confusion), rhetorical (sarcasm) [15], and motivational (desire) categories, offering broader ecological validity.

Emotion-aware AI may also complement multimodal assistive systems that integrate cognitive, physiological, and attentional context in knowledge-work environments [16]. Related human-computer interaction research has examined how eye-tracking signals can characterize variations in cognitive effort during digital-document reading [17][19].

2.2 LLMs for Emotion and Sentiment↩︎

GPT-3 [20] demonstrated zero-shot classification through in-context learning, with instruction tuning [21], [22] substantially improving generalization. SentimentGPT [5] found LLMs competitive on coarse polarity but weaker on low-frequency emotion classes. Yang et al. [4] evaluated ChatGPT and GPT-4 on sentiment tasks but excluded Claude, Gemini, and a fine-grained 13-class taxonomythe gap this study directly addresses.

3 Methodology↩︎

3.1 Dataset↩︎

The boltuix/emotions-dataset [23] is a publicly available Hugging Face corpus of 131,306 English sentences annotated with one of 13 mutually exclusive emotion labels: happiness, sadness, fear, anger, love, disgust, surprise, neutral, confusion, desire, shame, guilt, and sarcasm. A stratified random sample of \(N=1{,}000\) sentences was drawn with seed = 42, preserving class proportions to simulate realistic deployment conditions. Table 1 reports the distribution. Happiness is the most frequent class (20.5%, \(n=205\)); desire is the rarest (1.9%, \(n=19\)). This 10:1 ratio has direct consequences for macro-F1: models concentrating predictions on high-frequency classes achieve deceptively high accuracy while failing on minority classes.

Table 1: Class Distribution in Stratified Sample (\(N=1{,}000\))
Emotion Count % Emotion Count %
happiness 205 20.5 disgust 60 6.0
neutral 135 13.5 surprise 44 4.4
sadness 130 13.0 shame 34 3.4
anger 107 10.7 sarcasm 26 2.6
love 76 7.6 guilt 26 2.6
confusion 70 7.0 desire 19 1.9
fear 68 6.8
Total: 1,000 (100.0%)

3.2 Models and API Configuration↩︎

Three frontier LLMs were queried through their production APIs as of April 2, 2026: Claude (claude-sonnet-4-6) through Anthropic’s Messages API with default sampling; ChatGPT (GPT-5.4) through OpenAI’s Chat Completions API with temperature=0; and Gemini (gemini-2.5-flash) through Google’s Generative AI API with default sampling. All models received max_tokens=10, enforcing single-word responses. Responses not matching one of the 13 canonical labels after case normalization were treated as errors; all three models exhibited strong label adherence in practice.

3.3 Prompt Design↩︎

A single-turn prompt was used identically across all models, with no system message and no few-shot examples [20], [24]:

“Classify the emotion expressed in this sentence. Reply with ONLY one word from this list: happiness, sadness, fear, anger, love, disgust, surprise, neutral, confusion, desire, shame, guilt, sarcasm. Sentence: {sentence}. Emotion:”

The full label list constrains the output space; imperative instruction style elicits consistent outputs from instruction-tuned models [21]. No chain-of-thought preamble is included, ensuring performance reflects raw affective inference [24].

3.4 Evaluation Metrics↩︎

Four metrics were computed per model: (i) Overall Accuracy; (ii) Macro-F1 (\(F1_\text{mac}\)), the primary metric for minority-class evaluation; (iii) Weighted-F1 (\(F1_\text{wt}\)); and (iv) Cohen’s Kappa (\(\kappa\)[25]. Pairwise comparisons used McNemar’s test [26] with continuity correction.

4 Results↩︎

4.1 Overall Performance↩︎

Table 2 summarizes aggregate performance. Gemini leads on all four metrics (accuracy 39.9%, macro-F1 0.363, \(\kappa=0.337\)), followed by GPT-5.4 (38.8%, 0.291, 0.327) and Claude (38.0%, 0.159, 0.320). All three models substantially exceed the majority-class baseline (20.5%) and random baseline (7.7%), yet fall far below human-level performance (\(>\)​70%) [10]. The narrow 1.9 pp spread suggests convergence near a shared zero-shot ceiling, confirmed by the McNemar results below.

Table 2: Overall Performance (\(N=1{,}000\))
Model Acc.(%) F1\(_\text{mac}\) F1\(_\text{wt}\) \(\kappa\)
Claude (sonnet-4-6) 38.0 0.159 0.394 0.320
GPT-5.4 38.8 0.291 0.387 0.327
Gemini (2.5-flash) 39.9 0.363 0.394 0.337

4.2 Per-Emotion Accuracy↩︎

Table 3 and Fig. 2 present per-class accuracy. Sarcasm (96.2%–100%) and desire (89.5%–94.7%) stand in stark contrast to all other categories. Anger (53.3%–61.7%), fear (44.1%–48.5%), and sadness (43.1%–55.4%) form a mid-performance cluster. Love (14.5%–27.6%), confusion (22.9%–27.1%), and shame (17.6%–29.4%) are consistently the hardest categories. Notable model-specific divergences include Gemini collapsing on neutral (14.8% vs.Claude’s 31.1%), Claude leading on guilt (50.0%) and neutral, and GPT-5.4 leading on sadness and love.

Table 3: Per-Emotion Accuracy (%) by Model
Emotion Claude GPT-5.4 Gemini
sarcasm 96.2 100.0 100.0
desire 89.5 94.7 94.7
anger 53.3 61.7 61.7
guilt 50.0 42.3 34.6
fear 44.1 47.1 48.5
sadness 43.1 55.4 49.2
happiness 35.6 24.9 45.9
disgust 30.0 35.0 30.0
neutral 31.1 25.9 14.8
shame 29.4 17.6 26.5
surprise 27.3 25.0 27.3
confusion 22.9 25.7 27.1
love 14.5 27.6 14.5
Overall 38.0 38.8 39.9
Figure 1: Normalized confusion matrices for Claude, GPT-5.4, and Gemini. Off-diagonal mass concentrates on semantically proximal pairs: love\leftrightarrowhappiness, fear\leftrightarrowsadness, and confusion\leftrightarrowneutral.
Figure 2: Per-emotion accuracy heatmap (%). Sarcasm scores highest (96.2–100%); love and neutral are consistently weakest.

Fig. 1 presents normalized confusion matrices. Cross-model patterns include love misclassified as happiness, confirming semantic overlap between positive affect categories; confusion misclassified as neutral and sadness; and fear frequently assigned to sadness, suggesting that shared negative valence dominates arousal-level distinctions.

4.3 Statistical Significance↩︎

Table 4 presents McNemar’s test \(p\)-values. No comparison reaches significance at \(\alpha=0.05\), supporting convergence: accuracy differences are consistent with random variation, and no model can be declared definitively superior under this protocol.

Table 4: McNemar’s Test \(p\)-Values (\(\alpha=0.05\))
Comparison \(p\)-value Significant?
Claude vs.GPT-5.4 0.5083 No
Claude vs.Gemini 0.1350 No
GPT-5.4 vs.Gemini 0.4095 No

4.4 Sentence Length Analysis↩︎

Performance peaks in the medium range (5–15 words): Claude = 41.3%, GPT-5.4 = 42.0%, and Gemini = 43.6% (\(n=567\)). Long sentences (\(>\)​15 words) produce the lowest accuracy (33.2%–34.3%), a \(\sim\)​9 pp drop consistent across all models (Fig. 3), suggesting a structural property of zero-shot affective inference.

Figure 3: Accuracy by sentence length. Medium sentences (5–15 words) yield peak performance; long sentences (>​15 words) degrade accuracy by \sim​9 pp across all models.

5 Discussion↩︎

Zero-shot ceiling: The 1.9 pp accuracy spread and non-significant McNemar results indicate all three models have converged near a shared zero-shot ceiling. For practitioners, provider choice is unlikely to affect raw accuracy. However, the macro-F1 gap (0.159 vs., Claude vs.Gemini) is practically significant: in applications requiring minority-class sensitivity (e.g., shame, guilt), Gemini is the preferred choice.

Sarcasm/desire paradox and hard categories: Near-perfect sarcasm (96.2%–100%) and desire (89.5%–94.7%) accuracies likely reflect small support sizes (\(n=26\), \(n=19\)) and atypical lexical prototypicality [27] rather than robust affective understanding. Conversely, love is the worst-performing class for Claude and Gemini (14.5%), driven by semantic overlap with happiness. The confusion matrix confirms that most love misclassifications land on happiness, consistent with GoEmotions [10], where positive social emotions formed the hardest discrimination cluster.

Provider-specific biases: Claude’s macro-F1 of 0.159less than half of Gemini’s 0.363despite comparable accuracy (38.0%) is the signature of majority-class prediction bias [22]. Claude over-predicts happiness while underperforming on minority classes, likely amplified by alignment processes during pretraining [21]. This is a critical limitation for mental health applications where rare emotions carry high clinical significance. Gemini, by contrast, collapses on neutral (14.8% vs.Claude’s 31.1%), systematically reassigning neutral sentences to emotional categories. This pattern may reflect RLHF objectives rewarding emotionally engaging outputs [21], making Gemini unreliable for applications requiring neutral-state detection.

Implications and limitations: Accuracy in the 38%–40% range falls well short of deployment thresholds for emotionally sensitive contexts [1], [2]. Key limitations include the zero-shot-only evaluation (few-shot prompting may substantially improve all models), reliance on a single English-language dataset, and high-variance estimates for rare classes (\(n<30\)). The results reflect API behavior as of April 2, 2026; continuous model updates may alter findings.

6 Conclusion↩︎

We presented the first direct zero-shot evaluation of Claude, GPT-5.4, and Gemini on 13-class emotion classification using production APIs. Gemini led on all metrics (accuracy 39.9%, macro-F1 0.363), although no pairwise difference was statistically significant, suggesting convergence near a shared zero-shot ceiling. Our results reveal that frontier LLMs remain substantially below human-level affective awareness in zero-shot fine-grained settings. Future work should explore few-shot and chain-of-thought prompting [24] for minority-class improvement, fine-tuned baselines to quantify the zero-shot gap, and multilingual evaluation to probe cross-lingual affective generalization.

Acknowledgement↩︎

This work is supported in part by NSF 245523. Any opinions, findings, and conclusions or recommendations expressed in this material are of the author(s) and do not necessarily reflect those of the sponsors.

References↩︎

[1]
S. Chancellor and M. De Choudhury, “Methods in predictive techniques for mental health status on social media: A critical review,” npj Digital Medicine, vol. 3, no. 43, 2020, doi: 10.1038/s41746-020-0233-7.
[2]
H. Rashkin, E. M. Smith, M. Li, and Y.-L. Boureau, “Towards empathetic open-domain conversation models: A new benchmark and dataset,” in Proceedings of the 57th annual meeting of the association for computational linguistics (ACL), 2019, pp. 5370–5381, doi: 10.18653/v1/P19-1534.
[3]
P. Ekman, “An argument for basic emotions,” Cognition & Emotion, vol. 6, no. 3–4, pp. 169–200, 1992, doi: 10.1080/02699939208411068.
[4]
S. Sabour et al., EmoBench: Evaluating the emotional intelligence of large language models,” in Proceedings of the 62nd annual meeting of the association for computational linguistics (volume 1: Long papers), 2024, pp. 5986–6004, doi: 10.18653/v1/2024.acl-long.326.
[5]
K. Kheiri and H. Karimi, SentimentGPT: Exploiting GPT for advanced sentiment analysis and its departure from current machine learning,” arXiv preprint arXiv:2307.10234, 2023, doi: 10.48550/arXiv.2307.10234.
[6]
S. M. Mohammad and P. D. Turney, “Crowdsourcing a word–emotion association lexicon,” Computational Intelligence, vol. 29, no. 3, pp. 436–465, 2013, doi: 10.1111/j.1467-8640.2012.00460.x.
[7]
C. Strapparava and R. Mihalcea, SemEval-2007 task 14: Affective text,” in Proceedings of the 4th international workshop on semantic evaluations (SemEval-2007), 2007, pp. 70–74, [Online]. Available: https://aclanthology.org/S07-1013.
[8]
S. M. Mohammad, F. Bravo-Marquez, M. Salameh, and S. Kiritchenko, SemEval-2018 task 1: Affect in tweets,” in Proceedings of the 12th international workshop on semantic evaluation (SemEval-2018), 2018, pp. 1–17, doi: 10.18653/v1/S18-1001.
[9]
A. Chatterjee, K. N. Narahari, M. Joshi, and P. Agrawal, SemEval-2019 task 3: EmoContext contextual emotion detection in text,” in Proceedings of the 13th international workshop on semantic evaluation (SemEval-2019), 2019, pp. 39–48, doi: 10.18653/v1/S19-2005.
[10]
D. Demszky, D. Movshovitz-Attias, J. Ko, A. Cowen, G. Nemade, and S. Ravi, GoEmotions: A dataset of fine-grained emotions,” in Proceedings of the 58th annual meeting of the association for computational linguistics (ACL), 2020, pp. 4040–4054, doi: 10.18653/v1/2020.acl-main.372.
[11]
J. Devlin, M.-W. Chang, K. Lee, and K. Toutanova, BERT: Pre-training of deep bidirectional transformers for language understanding,” in Proceedings of the 2019 conference of the north american chapter of the association for computational linguistics (NAACL), 2019, pp. 4171–4186, doi: 10.18653/v1/N19-1423.
[12]
K. Pineda, A. M. Perrotti, F. Poursardar, D. Graber, and S. Jayarathna, “Using BERT to understand TikTok users’ ADHD discussion,” in 2023 IEEE 24th international conference on information reuse and integration for data science (IRI), 2023, pp. 213–214.
[13]
Y. Liu et al., RoBERTa: A robustly optimized BERT pretraining approach,” arXiv preprint arXiv:1907.11692, 2019, doi: 10.48550/arXiv.1907.11692.
[14]
J. P. Tangney and R. L. Dearing, Shame and guilt. New York, NY: Guilford Press, 2002.
[15]
A. Joshi, P. Bhattacharyya, and M. J. Carman, “Automatic sarcasm detection: A survey,” ACM Computing Surveys, vol. 50, no. 5, pp. 73:1–73:22, 2017, doi: 10.1145/3124420.
[16]
L. Obiuwevwi, K. J. Rechowicz, V. Ashok, S. Shetty, and S. Jayarathna, “Cognitive prosthetic: An AI-enabled multimodal system for episodic recall in knowledge work,” in Proceedings of the extended abstracts of the 2026 CHI conference on human factors in computing systems, 2026, pp. 1–7, doi: 10.1145/3772363.3798940.
[17]
B. Mahanama, G. Jayawardena, and S. Jayarathna, “Analyzing unconstrained reading patterns of digital documents using eye tracking,” in 2021 ACM/IEEE joint conference on digital libraries (JCDL), 2021, pp. 282–283.
[18]
B. Mahanama, G. Jayawardena, Y. Abeysinghe, V. Ashok, and S. Jayarathna, “Multidisciplinary reading patterns of digital documents,” in 2022 symposium on eye tracking research and applications, 2022, pp. 1–2.
[19]
K. Thennakoon, Y. Abeysinghe, P. Thenahandi, L. Obiuwevwi, V. Ashok, and S. Jayarathna, “How devices shape mental effort in digital document reading: An eye-tracking study,” in 2025 ACM/IEEE joint conference on digital libraries (JCDL), 2025, pp. 237–240, doi: 10.1109/JCDL67857.2025.00035.
[20]
T. B. Brown et al., “Language models are few-shot learners,” Advances in Neural Information Processing Systems (NeurIPS), vol. 33, pp. 1877–1901, 2020, doi: 10.5555/3495724.3495883.
[21]
L. Ouyang et al., “Training language models to follow instructions with human feedback,” Advances in Neural Information Processing Systems (NeurIPS), vol. 35, pp. 27730–27744, 2022, doi: 10.5555/3600270.3602281.
[22]
J. Wei et al., “Finetuned language models are zero-shot learners,” in International conference on learning representations (ICLR), 2022, doi: 10.48550/arXiv.2109.01652.
[23]
boltuix, “Emotions-dataset.” HuggingFace Datasets, 2023, [Online]. Available: https://huggingface.co/datasets/boltuix/emotions-dataset.
[24]
J. Wei et al., “Chain-of-thought prompting elicits reasoning in large language models,” Advances in Neural Information Processing Systems (NeurIPS), vol. 35, pp. 24824–24837, 2022, doi: 10.5555/3600270.3602070.
[25]
J. Cohen, “A coefficient of agreement for nominal scales,” Educational and Psychological Measurement, vol. 20, no. 1, pp. 37–46, 1960, doi: 10.1177/001316446002000104.
[26]
Q. McNemar, “Note on the sampling error of the difference between correlated proportions or percentages,” Psychometrika, vol. 12, no. 2, pp. 153–157, 1947, doi: 10.1007/BF02295996.
[27]
H. Larochelle, D. Erhan, and Y. Bengio, “Zero-data learning of new tasks,” in Proceedings of the 23rd AAAI conference on artificial intelligence (AAAI), 2008, pp. 646–651, [Online]. Available: https://aaai.org/papers/00646-aaai08-103-zero-data-learning-of-new-tasks/.