arXiv:2608.22745cs.CLAug 2026

Manuscript Offprint

arXiv:2608.22745

DiaRelay: Relaying Dialogue Context with a Constant-Size Memory for Emotion Recognition in Conversation

Zihao Zhou, Bin Yang, Jinghui Qin, Kebing Jin

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Emotion Recognition in Conversation (ERC) requires models to identify subtle emotional cues that are often distributed across distant dialogue turns. Existing methods typically incorporate dialogue history through a fixed context window. However, short windows discard potentially useful long-range evidence, while enlarging the window repeatedly re-encodes overlapping utterances, increases computational and memory costs, and may introduce irrelevant context. Moreover, commonly used parameter-efficient adaptation methods, such as LoRA, mainly introduce fixed low-rank transformations in the feature space and do not explicitly maintain a dialogue-level state or condition their transformations on the evolving conversational context. To address these limitations, we propose a lightweight adapter, named DiaRelay, to enable large language models (LLMs) to explicitly maintain a dialogue-level memory for accurate ERC. Based on LoRA, DiaRelay introduces two extra tightly collaborative components, Selective Relay Memory Transition and Dual-axis Relay Memory Read. Selective Relay Memory Transition progressively aggregates useful historical evidence into a bounded relay memory and propagates it across successive utterance predictions. This allows earlier emotional cues to influence later predictions after they leave the local context window, without re-encoding the complete dialogue history or expanding the backbone context length. Dual-axis Relay Memory Read uses the propagated memory to dynamically modulate low-rank feature transformations, enabling context-dependent representation adaptation without test-time gradient updates. Extensive experiments show that DiaRelay can achieve state-of-the-art weighted F1 and accuracy on MELD while obtaining competitive results on IEMOCAP with only an extra ∼\sim7.1M trainable parameters, indicating the effectiveness and generalizability of our DiaRelay in enhancing LLM-based emotional understanding.

Introduction

Emotion Recognition in Conversation (ERC) aims to identify the emotion expressed by each utterance in a dialogue. It plays an important role in affective computing and supports a wide range of applications, including conversational agents, social media analysis, and human–computer interaction. Unlike isolated emotion classification, ERC requires models to interpret each utterance in relation to its conversational context. A short or semantically ambiguous utterance may convey different emotions depending on preceding events, speaker interactions, and previously expressed attitudes. Therefore, effectively modeling dialogue history is a central challenge in ERC (Poria et al. 2019b; Majumder et al. 2019; Ghosal et al. 2019).

Existing ERC methods capture contextual information using recurrent networks, graph-based reasoning, attention mechanisms, and pretrained language models (Majumder et al. 2019; Ghosal et al. 2019; Shen et al. 2021a; Lei et al. 2023). With the increasing adoption of large language models, a common strategy is to concatenate the current utterance with a fixed number of preceding utterances as context and deploy parameter-efficient fine-tuning (PEFT) technology to endow LLMs with the capability to predict the emotion inherent in the current utterance. However, this strategy has the following limitation. A short context window may exclude potentially useful historical evidence once earlier utterances fall outside the context window. Enlarging the context window provides broader historical coverage, but it increases computational and memory costs, and may introduce irrelevant context. Although parameter-efficient adaptation methods such as LoRA (Hu et al. 2022) are deployed to enable LLMs to understand emotions and reason efficiently, this limitation can not be resolved by these methods since the learned mappings of LoRA or its variants are shared across dialogue turns and do not explicitly maintain a persistent dialogue-level memory that is crucial for accurate emotion recognition in conversation with limited context. Consequently, once an utterance leaves the explicit context window, standard PEFT technology can not preserve useful cues antecedent to the current context window or condition later transformations on the evolving dialogue history.

This limitation motivates us to develop a new memory-augmented adaptation mechanism that complements explicit local context modeling with a compact dialogue-level memory. Such a mechanism should preserve useful historical information beyond the local context window, process each utterance adaptively according to the accumulated conversation, and maintain a bounded memory size as the dialogue grows. Meanwhile, it also should retain the parameter efficiency of low-rank adaptation and avoid gradient-based parameter updates during inference.

To this end, we propose DiaRelay, a lightweight memory-augmented adapter that enables LLMs to explicitly maintain and exploit dialogue-level memory for ERC. Based on

∗^{*}Corresponding author

LoRA, DiaRelay complements a fixed local context window with a bounded cross-utterance constant-size relay memory, which is progressively propagated across successive utterance predictions. Rather than retaining an ever-growing sequence of historical representations, DiaRelay compresses conversation history into a constant-size memory and uses it to condition the low-rank adaptation applied to the current utterance. DiaRelay contains two tightly collaborative components: Selective Relay Memory Transition (SRMT) and Dual-axis Relay Memory Read (DaRMR). SRMT progressively updates the relay memory through a gated error-corrective operation. It selectively incorporates useful information from the current utterance while retaining useful historical content, allowing the memory to evolve throughout the conversation without increasing the memory size. DaRMR retrieves complementary information from the propagated memory and produces context-dependent low-rank corrections for the query and output pathways of self-attention. In this way, the backbone representation is dynamically adapted according to the accumulated dialogue context rather than relying solely on a fixed low-rank transformation. The two components operate under a "read-before-write" paradigm. When predicting the t-th utterance, DaRMR accesses only the relay memory of the previous t-1 turns. After the prediction, SRMT incorporates the current utterance into the relay memory for memory updating. This paradigm prevents the current utterance from being written into the memory before its own prediction, while allowing it to provide historical information for subsequent utterances. As a result, earlier emotional cues can continue to affect later predictions after leaving the explicit context window, without expanding the context length of inputs, re-encoding the complete dialogue history, or performing test-time gradient updates. Extensive experiments on MELD and IEMOCAP under a unified history-only setting show that DiaRelay improves both accuracy and weighted F1 over strong LoRA-based fixed-window baselines, indicating the effectiveness and generalizability of our DiaRelay in enhancing LLM-based emotional understanding. In particular, DiaRelay achieves state-of-the-art weighted F1 on MELD while obtaining competitive performance on IEMOCAP.

Overall, our main contributions are threefold:

• We propose DiaRelay, a lightweight memory-augmented adapter that complements a fixed local context window with a bounded cross-utterance constant-size relay memory. DiaRelay enables historical information to persist across successive utterance predictions without expanding the input context length or requiring test-time parameter updates.

• In DiaRelay, we introduce SRMT and DaRMR. The SRMT selectively updates the relay memory through a gated error-corrective transition, while the DaRMR retrieves complementary memory information to generate context-dependent low-rank corrections for the query and output pathways. Together, they establish a "read-before-write" paradigm for dialogue-level memory propagation and utilization.

• Extensive experiments on MELD and IEMOCAP demonstrate that DiaRelay outperforms strong LoRA-based fixed-window baselines in both accuracy and weighted F1, indicating the effectiveness and generalizability of our DiaRelay in enhancing LLM-based emotional understanding. DiaRelay achieves state-of-the-art weighted F1 on MELD while adding only ∼\sim7.1M trainable parameters, approximately 0.09% of the Qwen3-8B backbone.