Skip to content

EmoLASP: Emotion Recognition with Language Models and Answer Set Programming

Conference: EMNLP 2026
Paper: ACL Anthology
Code: https://github.com/thaole25/emolasp
Area: Reasoning
Keywords: Emotion Recognition, Answer Set Programming, Neuro-Symbolic Reasoning, Emotional Contagion, Dimensional Emotion

TL;DR

This paper proposes EmoLASP, a neuro-symbolic framework coupling language models with Answer Set Programming (ASP) declarative reasoning for conversational emotion recognition, which selects optimal Valence-Arousal-Dominance (VAD) hypotheses via weak constraints and outperforms full-history prompt baselines without dialogue history or fine-tuning.

Background & Motivation

Emotion Recognition in Conversations (ERC) is a foundational capability for building empathetic dialogue agents, conversational therapy tools, and mental health monitoring systems. While traditional research predominantly centers on fine-tuning pre-trained language models (PLMs) on discrete categorical emotion labels, discrete classification fails to capture fine-grained emotional intensity, blending states, and subtle affective shifts. Dimensional representations such as the Valence-Arousal-Dominance (VAD) space offer substantially richer expressive capacity; however, modeling multi-turn affective trajectories within continuous spaces remains an open challenge for existing language technologies.

Deploying modern large language models (LLMs) for continuous emotional modeling faces severe foundational dilemmas. First, pure neural autoregressive models operate as opaque black boxes that lack structural inductive biases for temporal emotional continuity; they frequently generate ungrounded, wildly fluctuating emotional trajectories across dialogue turns. Second, capturing conversational context conventionally demands prepending full dialogue histories into prompts. This practice dramatically inflates token consumption, introduces latency bottlenecks, and risks attention dispersion or recency bias, while supervised fine-tuning incurs prohibitive computational and data annotation expenses.

To overcome these obstacles, this work introduces a novel division of labor between neural semantic perception and declarative symbolic reasoning: un-finetuned LLMs are tasked strictly with interpreting local semantic cues from individual utterances into ranked candidate hypotheses, while multi-turn temporal continuity and Emotional Contagion dynamics are delegated to an Answer Set Programming (ASP) reasoning layer. Core idea: by combining an entropy-gated activation mechanism with ASP non-deterministic choice rules and prioritized weak constraints, EmoLASP filters neural VAD hypotheses against temporal historical aggregates, achieving superior conversational consistency and lower token cost without requiring dialogue history inputs.

Method

Overall Architecture

The EmoLASP framework consists of a two-layer neuro-symbolic pipeline: a neural semantic layer powered by an LLM or fine-tuned PLM, followed by a declarative reasoning layer implemented in Clingo. For a target utterance, the language model outputs a ranked list of \(m\) candidate VAD triples. The system computes a normalized Shannon entropy confidence score over these hypotheses; when the model exhibits high uncertainty below a pre-set threshold, the ASP module is invoked, whereas confident predictions bypass the reasoner. Inside ASP, the system aggregates predictions across a temporal sliding window of recent turns and performs multi-objective optimization via prioritized weak constraints, selecting the hypothesis that minimizes affective distance to the dialogue context while respecting model confidence ranks.

%%{init: {'flowchart': {'rankSpacing': 24, 'nodeSpacing': 28, 'padding': 6, 'wrappingWidth': 400}}}%%
flowchart TD
    A["Dialogue Utterance u_i"] --> B["VAD Hypothesis Generation<br/>LLM/PLM yields top-m ranked triples"]
    B --> C["Entropy Uncertainty Gating<br/>Normalized confidence score c_i"]
    C -->|c_i โ‰ฅ ฯ„ high confidence| D["Direct Top-1 Acceptance h_i^(1)"]
    C -->|c_i < ฯ„ uncertain| E["Temporal Affect Aggregation<br/>Sliding window k-turn aggregate A_i"]
    E --> F["ASP Declarative Weak Constraint Optimization<br/>Priority @2 min distance + @1 min rank"]
    F --> G["Final Selected Prediction y_hat_i"]
    D --> G

Key Designs

1. VAD Hypothesis Generation: Mitigating single-pass prediction stochasticity and surface ambiguity

Relying on a single point prediction often leads to brittle outputs when utterances contain figurative speech, sarcasm, or ambiguous affective tones. EmoLASP prompts the language model to generate an ordered candidate set \(H_i = \{h_i^{(1)}, h_i^{(2)}, \dots, h_i^{(m)}\}\), where each hypothesis represents a discretized VAD rating vector on a 1-to-5 Likert scale. For prompt-based open-source LLMs, the prompt specifies generating the top-\(m\) hypotheses ordered from most to least likely without any task-specific fine-tuning; under the no-history (nohist) regime, only the current utterance is supplied. For fine-tuned PLMs (BERT, RoBERTa), three classification heads predict Likert scores independently across dimensions, and candidate triples are ranked by the joint product of per-dimension softmax probabilities.

2. Entropy Uncertainty Gating: Preventing unnecessary computational overhead and preserving confident predictions

Invoking the symbolic solver indiscriminately on every turn creates computational redundancy and risks overriding highly confident, obvious local predictions. EmoLASP computes an utterance-level confidence score derived from the hypothesis probability distribution. Let \(p_i^{(j)}\) denote the normalized probability assigned to hypothesis \(h_i^{(j)}\). The confidence score \(c_i\) is formulated via normalized Shannon entropy:

\[c_i = 1 - \frac{E(p_i)}{\ln m}, \quad E(p_i) = - \sum_{j=1}^{m} p_i^{(j)} \ln p_i^{(j)}\]

Dividing by the theoretical maximum entropy \(\ln m\) bounds \(c_i \in [0, 1]\). The symbolic ASP solver is executed if and only if \(c_i < \tau\) (default \(\tau = 0.25\), corresponding to the top candidate having less than approximately 0.7 probability mass under \(m=3\)). If confidence meets or exceeds \(\tau\), the model's top-ranked hypothesis \(h_i^{(1)}\) is directly emitted.

3. Temporal Affect Aggregation: Bypassing raw text history while maintaining context awareness

Rather than repeatedly feeding lengthy conversational transcripts into the neural model's prompt window, EmoLASP tracks past predicted emotional states across dialogue turns. Over a history window of size \(k\), the system aggregates the model's own prior predictions \(\hat{Y}_{i-1} = \{\hat{y}_{i-k}, \dots, \hat{y}_{i-1}\}\) into an arithmetic mean context vector:

\[A_i = \frac{1}{k} \sum_{j=i-k}^{i-1} \hat{y}_j\]

Because only the system's own historical predictions are consumed, ground-truth label leakage is strictly prevented. This moving average acts as an affective anchor reflecting Emotional Contagion and natural emotional inertia in human conversations, granting the reasoner rich temporal context even when the LLM receives zero text history.

4. ASP Declarative Weak Constraint Optimization: Enforcing psychological continuity via explicit symbolic rules

The core innovation of EmoLASP lies in utilizing Answer Set Programming weak constraints to perform context-grounded hypothesis selection. Two prioritized weak constraints formalize the multi-objective selection criteria:

:~ pick(N,H), hist_penalty(N,H,P). [P@2, N, H]
:~ pick(N,H). [H@1, N, H]

Priority level @2 (highest priority) penalizes the \(L_1\) norm distance \(P\) between the candidate hypothesis and the historical aggregate \(A_i\), driving the solver to choose the hypothesis most harmonious with recent affective context. Priority level @1 breaks distance ties by favoring candidates with lower rank index \(H\), thereby preserving the language model's native ranking preference. This declarative structure allows psychological and behavioral priors to be added as modular logical constraints without retraining the neural backbone.

Benchmark & Evaluation Protocol

Experiments are evaluated on the benchmark IEMOCAP dataset, which contains 115 dyadic conversational sessions across 5 recording sessions (10,039 utterances) annotated with continuous VAD values averaged from multiple human evaluators. The benchmark suite includes 6 open-source instruction-tuned LLMs ranging from 3B to 120B parameters (Llama-3.2-3B, Gemma-3-4B, GPT-OSS-20B, Gemma-3-27B, Llama-3.3-70B, GPT-OSS-120B) alongside 2 supervised fine-tuned PLMs (BERT and RoBERTa-large). Performance is evaluated using Mean Absolute Error (MAE, continuous error metric) and Krippendorff's \(\alpha\) (inter-rater agreement with human ordinal ratings). The default hyperparameter anchor is set to \(k=2, m=3, \tau=0.25\).

Key Experimental Results

Main Results

The table below presents the cross-session average results on IEMOCAP for MAE and Krippendorff's \(\alpha\). Crucially, the "Handicap" setting compares EmoLASP seeing zero dialogue context (nohist) directly against the standard unassisted baseline provided with full conversational history (hist).

Model Category Model Name MAE (No Reasoner, nohist) MAE (No Reasoner, hist) MAE (EmoLASP, nohist) MAE (EmoLASP, hist) ฮฑ (No Reasoner, nohist) ฮฑ (EmoLASP, hist)
Human Benchmark Humans alone โ€” โ€” โ€” โ€” โ€” \(\bar{\alpha} = 0.39 \pm 0.03\)
< 10B Llama-3.2-3B \(0.88 \pm 0.03\) \(1.01 \pm 0.02\) \(0.83 \pm 0.02\) \(0.95 \pm 0.01\) \(0.21 \pm 0.02\) \(0.19 \pm 0.02\)
< 10B Gemma-3-4B \(0.76 \pm 0.03\) \(0.84 \pm 0.03\) \(0.74 \pm 0.03\) \(0.76 \pm 0.04\) \(0.26 \pm 0.02\) \(0.24 \pm 0.02\)
20-30B GPT-OSS-20B \(0.84 \pm 0.02\) \(0.82 \pm 0.03\) \(0.76 \pm 0.02\) \(0.73 \pm 0.02\) \(0.28 \pm 0.02\) \(0.32 \pm 0.02\)
20-30B Gemma-3-27B \(0.77 \pm 0.01\) \(0.75 \pm 0.02\) \(0.77 \pm 0.01\) \(0.75 \pm 0.01\) \(0.28 \pm 0.02\) \(0.26 \pm 0.03\)
> 60B Llama-3.3-70B \(0.96 \pm 0.02\) \(0.91 \pm 0.04\) \(0.81 \pm 0.02\) \(0.81 \pm 0.03\) \(0.29 \pm 0.02\) \(0.32 \pm 0.02\)
> 60B GPT-OSS-120B \(0.91 \pm 0.02\) \(0.85 \pm 0.03\) \(0.75 \pm 0.01\) \(0.71 \pm 0.02\) \(0.27 \pm 0.02\) \(0.30 \pm 0.02\)
PLM BERT (fine-tuned) \(0.78 \pm 0.03\) \(0.74 \pm 0.03\) \(0.77 \pm 0.03\) \(0.73 \pm 0.03\) \(0.29 \pm 0.03\) \(0.30 \pm 0.02\)
PLM RoBERTa-large (fine-tuned) \(0.78 \pm 0.02\) \(0.72 \pm 0.04\) \(0.77 \pm 0.02\) \(0.71 \pm 0.05\) \(0.28 \pm 0.02\) \(0.32 \pm 0.03\)

Ablation Study

The table below summarizes hyperparameter sensitivity sweeps across history window size \(k\), hypothesis set size \(m\), confidence gate threshold \(\tau\), and speaker weighting ratio \(w_{self}:w_{other}\), aggregated across all 8 models over 5 sessions.

Ablation Dimension Setting Value MAE (nohist) MAE (hist) Krippendorff's ฮฑ (nohist) Krippendorff's ฮฑ (hist)
Window size \(k\) \(k=1\) \(0.79 \pm 0.03\) \(0.78 \pm 0.07\) \(0.26 \pm 0.03\) \(0.28 \pm 0.05\)
Window size \(k\) (default) \(k=2\) \(0.78 \pm 0.03\) \(0.77 \pm 0.07\) \(0.26 \pm 0.03\) \(0.28 \pm 0.04\)
Window size \(k\) \(k=3\) \(0.77 \pm 0.03\) \(0.76 \pm 0.07\) \(0.26 \pm 0.04\) \(0.27 \pm 0.05\)
Window size \(k\) \(k=5\) \(0.77 \pm 0.03\) \(0.75 \pm 0.07\) \(0.26 \pm 0.04\) \(0.28 \pm 0.04\)
Candidate count \(m\) (default) \(m=3\) \(0.78 \pm 0.03\) \(0.77 \pm 0.07\) \(0.26 \pm 0.03\) \(0.28 \pm 0.04\)
Candidate count \(m\) \(m=5\) \(0.76 \pm 0.06\) \(0.76 \pm 0.09\) \(0.26 \pm 0.03\) \(0.28 \pm 0.05\)
Candidate count \(m\) \(m=7\) \(0.76 \pm 0.08\) \(0.76 \pm 0.09\) \(0.26 \pm 0.04\) \(0.27 \pm 0.05\)
Candidate count \(m\) \(m=9\) \(0.76 \pm 0.08\) \(0.75 \pm 0.09\) \(0.25 \pm 0.04\) \(0.27 \pm 0.05\)
Confidence gate \(\tau\) \(\tau=0.10\) \(0.79 \pm 0.03\) \(0.78 \pm 0.08\) \(0.26 \pm 0.03\) \(0.28 \pm 0.05\)
Confidence gate \(\tau\) (default) \(\tau=0.25\) \(0.78 \pm 0.03\) \(0.77 \pm 0.07\) \(0.26 \pm 0.03\) \(0.28 \pm 0.04\)
Confidence gate \(\tau\) \(\tau=0.40\) \(0.77 \pm 0.03\) \(0.77 \pm 0.08\) \(0.26 \pm 0.04\) \(0.28 \pm 0.04\)
Confidence gate \(\tau\) \(\tau=0.60\) \(0.77 \pm 0.04\) \(0.76 \pm 0.08\) \(0.26 \pm 0.03\) \(0.28 \pm 0.04\)
Speaker weighting \(w_{self}:w_{other}\) 1:3 (interlocutor-skewed) \(0.78 \pm 0.03\) \(0.78 \pm 0.07\) \(0.26 \pm 0.03\) \(0.27 \pm 0.05\)
Speaker weighting \(w_{self}:w_{other}\) (default) 1:1 (neutral blind) \(0.78 \pm 0.03\) \(0.77 \pm 0.07\) \(0.26 \pm 0.03\) \(0.28 \pm 0.04\)
Speaker weighting \(w_{self}:w_{other}\) 3:1 (self-skewed) \(0.78 \pm 0.03\) \(0.77 \pm 0.07\) \(0.26 \pm 0.04\) \(0.28 \pm 0.04\)

Key Findings

  • Zero-History Handicap Superiority: Under the handicap comparison, EmoLASP operating with zero dialogue context (nohist) significantly outperforms the No Reasoner baseline provided with complete dialogue context (hist) on 5 out of 6 prompt-only LLMs (paired t-test \(p < 0.001\)). For instance, Llama-3.3-70B MAE drops from 0.91 to 0.81, and GPT-OSS-120B MAE drops from 0.85 to 0.75, slashing input token consumption and latency while boosting accuracy.
  • Architectural Divergence Between LLMs and PLMs: Supervised fine-tuned encoder models (BERT and RoBERTa) internalize multi-turn temporal dependencies directly into their dense representations; consequently, ASP optimization provides marginal gains under hist and slightly degrades performance under the handicap setting for RoBERTa (\(0.72 \rightarrow 0.77\)). This establishes that ASP post-reasoning delivers maximum utility for un-finetuned, prompt-based LLMs.
  • Hyperparameter Stability and Central-Tendency Robustness: The framework is remarkably insensitive to parameter variations, maintaining stable MAE across varying window sizes, candidate counts, and activation gates. Crucially, Krippendorff's \(\alpha\) remains statistically unchanged across 13 evaluations and improves in 3, disproving the concern that gains stem from central-tendency shrinkage.

Highlights & Insights

  • Decoupled Neuro-Symbolic Synergy: By using the language model strictly as a fuzzy candidate generator and ASP as a rigid, declarative contextual selector, the system leverages the respective strengths of neural semantics and logical optimization without backpropagation or code restructuring.
  • Cost-Efficient Industrial Paradigm: Replacing long dialogue context windows with a simple numeric moving-average buffer and a lightweight Clingo logic engine delivers substantial savings in token costs and inference wall-clock time for multi-turn conversational agents.
  • Transferable Logic Constraint Design: The methodology of using entropy-based gating combined with prioritized weak constraints can be readily transferred to multi-turn recommendation, dialogue act tracking, and agent goal planning.

Limitations & Future Work

  • Central Compression on Extreme and Figurative Utterances: Error analysis reveals that when ground-truth emotions hit extreme boundaries (ratings of 1 or 5) or rely on metaphors ("grunion on the beach") or short interjections ("Hmm"), all LLMs restrict candidate hypotheses to the mediocre middle range (2 to 4), leaving the ASP solver powerless to recover the true state.
  • Unimodal Limitation on Acted Multimodal Data: IEMOCAP ground truth was annotated on rich audio-visual interactions; assessing text-only transcripts ignores non-verbal acoustic cues (e.g., intonation, pitch), bounding prediction ceilings.
  • Future Directions: Integrating multimodal foundation models (VLMs/Audio-LLMs) to populate candidate sets and expanding ASP rule sets to incorporate causal personality traits and speaker persona profiles.
  • vs. Deep Recurrent & Graph Models (DialogueRNN, DialogueGCN, SKIER): Deep neural ERC architectures require extensive task-specific training on categorical labels; EmoLASP targets continuous dimensional VAD affect via zero-shot prompt generation and declarative ASP constraints, eliminating heavy fine-tuning.
  • vs. Full ASP Translation Pipelines (LogicAD, E-Friend): Prior neuro-symbolic systems translate entire user utterances into logic predicates, suffering from syntactic brittleness; EmoLASP keeps language models in charge of fuzzy interpretation and confines ASP strictly to multi-hypothesis ranking and temporal continuity enforcement.

Rating

  • Novelty: โญโญโญโญโ˜† First framework to couple Answer Set Programming weak constraints with language models for continuous VAD conversational emotion recognition.
  • Experimental Thoroughness: โญโญโญโญโญ Rigorous evaluation across 8 language models (3B to 120B), paired t-tests, and extensive parameter sweeps.
  • Writing Quality: โญโญโญโญโญ Well-structured, mathematically rigorous, with deep qualitative analysis uncovering core LLM failure modes.
  • Value: โญโญโญโญโ˜† Highly impactful engineering and scientific paradigm for reducing context token expenditure in long-horizon conversational reasoning.