arXiv:2608.29035cs.AIAug 2026

Manuscript Offprint

arXiv:2608.29035

EmoLASP: Emotion Recognition with Language Models and Answer Set Programming

Thao Le, Michael Thielscher

Abstract

Emotion recognition in conversations is increasingly tackled with language models, but these models can be unstable and expensive to fine-tune or to prompt with long dialogue histories. We propose EmoLASP, a framework that combines a language model with declarative reasoning via Answer Set Programming (ASP) to predict VAD scores (Valence-Arousal-Dominance) in conversations. Experiments on a widely used benchmark dataset (IEMOCAP) across six open-source LLMs (3B–120B) and two PLMs (BERT, RoBERTa) show that EmoLASP improves prediction performance compared to using the language model alone, even when the LLMs/PLMs are given no dialogue history in their prompts or input vectors. The gains are largest for prompt-only LLMs, which EmoLASP uses without any fine-tuning. However, for fine-tuned PLMs, the reasoner adds little once dialogue history is available. EmoLASP's LLM pipeline demonstrates the potential advantages of using a reasoning approach to ensure emotion prediction consistency and to reduce both the cost of fine-tuning and the cost of prompting with long dialogue histories.

1 Introduction

Emotion recognition in conversations (ERC) is the task of identifying the emotional state expressed in each utterance of a dialogue, and it supports various applications including empathetic dialogue systems and mental health support (Chu et al., 2025). Common approaches to ERC include using pre-trained language models (PLMs) and fine-tuning them on labelled emotion datasets to predict emotions (Park et al., 2021; Mendes and Martins, 2023). In recent years, large language models (LLMs) have been used to recognise emotions in text (Feng et al., 2024; Liu et al., 2024). However, there are several limitations of previous work that need to be addressed. First, most work on ERC focuses on categorical emotion classification, which is less

expressive than dimensional representations such as Valence-Arousal-Dominance (VAD) (Russell and Mehrabian, 1977; Russell, 1980). Additionally, while LLMs/PLMs have shown promising results in emotion recognition, their instability and bias (Wake et al., 2023) mean more research is needed to ensure consistent emotional reasoning in conversations. LLMs are essentially black boxes, which might provide an answer without following logical reasoning such as continuity of an emotional state. Moreover, relying solely on language models can be costly, whether due to fine-tuning on domain-specific datasets or the large number of input tokens required when feeding the entire dialogue history in prompt-based approaches.

In this paper, we present a novel approach combining language models with declarative reasoning for emotion recognition. Declarative reasoning has proven effective in other areas such as logical anomaly detection in Vision-Language Models (Jin et al., 2025). We adopt Answer Set Programming (ASP) as our reasoning framework with the following advantages. First, ASP allows us to express non-deterministic choice rules (Eiter et al., 2022), which consider not only the language model's top prediction but also other possible hypotheses with lower confidence. This is particularly useful when outputs are highly uncertain. Second, and on top of this, weak constraints in ASP allow us to encode preferences over VAD hypotheses to select the best VAD hypothesis based on the dialogue context. Since Emotional Contagion Theory suggests that a person's emotions can be influenced by the emotions of others in a conversation (Hatfield et al., 1993), these weak constraints favour hypotheses consistent with prior turns. Overall, the crucial contribution of the ASP layer is its declarative and extensible nature, which allows us to define preferences for choosing between hypotheses by stating explicit rules. Additional preferences, including those derived from other psychological theories, can be incorporated as new rules rather than requiring modifications to imperative code or retraining of the language model. Our experiments show that the ASP reasoner can handle historical emotion dynamics and select context-consistent emotional hypotheses even when dialogue history is omitted from the language model's input. This is where our cost saving comes from: when EmoLASP is built on prompt-only LLMs, no fine-tuning is performed at all, and omitting the history further reduces the number of input tokens per turn.

To our knowledge, this is the first work combining language models and declarative reasoning for ERC. Our contributions are: (1) we propose the EmoLASP framework, a novel approach integrating a language model with a reasoner for emotion recognition in conversations; (2) we evaluate it against different open-source language models, including LLMs and PLMs, on a benchmark dataset; (3) we perform qualitative analysis to identify utterances for which LLMs find it most challenging to predict accurate VAD values, even with the help of an ASP reasoner and the presence of dialogue context. Our code is publicly available.¹

References (20)