Source-linked AI summary

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

Zihao Zhou, Bin Yang, Jinghui Qin, Kebing Jin

arXiv:2608.22745v1cs.CLcs.AI

TL;DR

Emotion recognition in conversation must preserve useful cues beyond fixed context windows without repeatedly encoding overlapping history or maintaining an evolving dialogue state. DiaRelay adds a constant-size relay memory to LoRA-based adaptation, achieving state-of-the-art weighted F1 on MELD and competitive results on IEMOCAP with 7.1M extra trainable parameters.

  • Problem

    Existing ERC approaches rely on fixed explicit context and do not explicitly maintain a compact state that evolves across utterance predictions.

  • Method

    DiaRelay combines selective relay memory transition with dual-axis memory reading to propagate bounded dialogue memory and modulate low-rank transformations context-dependently.

  • Results

    DiaRelay outperforms strong LoRA-based fixed-window baselines in accuracy and weighted F1, achieves state-of-the-art weighted F1 on MELD, and obtains competitive results on IEMOCAP.

  • Takeaways & Limitations

    DiaRelay provides persistent dialogue-level memory without extending the explicit context window, allowing historical emotional evidence to influence later predictions.

  • Takeaways & Limitations

    The evaluation is primarily text-only, while multimodal applicability and natural-language explanations for predicted emotions remain unexplored.

Abstract

from arXiv · show

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, DiaRelay, to enable 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 SOTA weighted F1 and accuracy on MELD while obtaining competitive results on IEMOCAP with only an extra 7.1M trainable parameters, indicating the effectiveness and generalizability of our DiaRelay in enhancing LLM-based emotional understanding.

Introduction

DiaRelay is a lightweight memory-augmented adapter that preserves dialogue history in a bounded relay memory while adapting LLMs for ERC. It outperforms strong LoRA-based fixed-window baselines, achieving state-of-the-art weighted F1 on MELD with approximately 7.1M additional trainable parameters.

  • Introduction: ERC requires interpreting each utterance using dialogue history because short or ambiguous utterances can depend on preceding events, speaker interactions, and expressed attitudes.Modeling dialogue history is therefore a central ERC challenge.
  • Introduction: DiaRelay introduces two tightly collaborative components, Selective Relay Memory Transition and Dual-axis Relay Memory Read, within a lightweight memory-augmented adapter based on LoRA.The method uses accumulated dialogue memory to condition low-rank adaptation for the current utterance while preserving parameter efficiency.
  • Introduction: DiaRelay complements a fixed local context window with a bounded, constant-size cross-utterance relay memory that propagates historical information across successive utterance predictions.It compresses conversation history instead of retaining an ever-growing sequence of historical representations, without expanding the input context length or requiring test-time parameter updates.

Related Work

Prior ERC work models dialogue context through recurrent, retrieval-based, memory-enhanced, and LLM-based approaches, but dialogue history is still mainly conveyed through repeatedly constructed explicit context. LoRA makes LLM adaptation efficient yet lacks an explicit mechanism for carrying accumulated dialogue information across predictions, which DiaRelay addresses with bounded relay-memory propagation.

  • Contextual Modeling for ERC: Early ERC methods propagate contextual and speaker-specific representations with recurrent architectures, including DialogueRNN (Majumder et al. 2019) and DialogueCRN (Hu, Wei, and Huai 2021).DialogueRNN tracks evolving individual-speaker states, while DialogueCRN uses iterative retrieval and reasoning to integrate emotional clues.
  • Memory and LLM-Based ERC: Memory-based ERC methods retain longer historical representations across utterances, while later approaches enrich LLMs with speaker knowledge and reasoning supervision.DialogXL (Shen et al. 2021a) modifies XLNet’s recurrence and attention at the utterance level, whereas LaERC-S (Fu et al. 2025) and CoE use speaker-focused or multi-stage auxiliary learning strategies.
  • Limitations of Existing Methods: DiaRelay addresses the limitation that dialogue history is repeatedly encoded through explicit target-utterance context across successive predictions.Prior methods’ gains mainly derive from richer input construction, additional knowledge, auxiliary supervision, or multi-stage training.
  • Parameter-Efficient Fine-Tuning: LoRA (Hu et al. 2022) introduces trainable low-rank transformations while freezing most backbone parameters, but its mappings are shared across turns without carrying accumulated dialogue information.DiaRelay addresses this limitation by propagating a bounded relay memory across predictions.

DiaRelay

DiaRelay augments LoRA-adapted Transformer layers with constant-size relay memories that preserve dialogue information across utterances. Its selective memory transition and dual-axis memory read dynamically condition self-attention while requiring no additional memory supervision or dialogue-history re-encoding.

  • DiaRelay: DiaRelay equips each adapted Transformer layer with an independent bounded relay memory propagated across successive utterance predictions.The memory is initialized at each dialogue boundary and maintains dialogue-level state without expanding the backbone context length.
  • Selective Relay Memory Transition: Selective Relay Memory Transition compresses target-utterance representations into relay vectors and selectively updates memory through dimension-wise retention, writing, and error-corrective propagation.The update gates independently balance historical retention against current residual information rather than indiscriminately accumulating complete values.
  • Dual-axis Relay Memory Read: Dual-axis Relay Memory Read reads propagated memory along complementary directions to generate query-side and output-side corrections for self-attention.The query correction steers attention using dialogue memory, while the output correction injects retrieved historical information into the representation.
  • Dual-axis Relay Memory Read: The memory-conditioned corrections apply only to the target utterance span, leaving explicit historical-context representations unchanged.This preserves the local context window while allowing propagated dialogue information to influence the current prediction.
  • Training and Inference: DiaRelay preserves the autoregressive generative objective and requires no additional memory supervision, retrieved demonstrations, speaker-profile labels, or reasoning annotations.During training and inference, relay memory is propagated sequentially within each dialogue and reset at dialogue boundaries.

Experiments

Experiments on IEMOCAP and MELD show that DiaRelay improves ERC performance over compact-backbone baselines and that persistent relay memory, residual updating, and dual-axis reading each contribute to its gains. Qualitative cases further show that full DiaRelay recovers emotional evidence outside the explicit context window.

  • Main Results: DiaRelay with Qwen3-4B surpasses previous ≤6B-backbone results by 1.80%/2.09% W-F1/accuracy on IEMOCAP and 0.32/1.33 on MELD.The comparison is reported in Table 2 against representative ERC methods.
  • Main Results: With Qwen3-8B, DiaRelay exceeds previous MELD results by 0.43% W-F1 and 0.54% accuracy, establishing a new state-of-the-art without external knowledge.It also achieves competitive IEMOCAP W-F1 without external augmentation or complex graph modeling.
  • Case Studies: In MELD case studies, Full DiaRelay correctly identifies fear and sadness when LoRA and Window-local DiaRelay misclassify targets requiring earlier emotional causes.The examples show that relay memory preserves useful evidence after it leaves the explicit local context.
  • Overall Effectiveness: Full DiaRelay improves over LoRA-only by 3.05%, 4.84%, and 2.41% on MELD and by 2.58%, 3.44%, and 2.34% on IEMOCAP for W-F1, macro F1, and accuracy.These results show benefits beyond static low-rank adaptation, particularly for macro F1.
  • Effect of Dialogue-level Relay: Full DiaRelay surpasses Window-local DiaRelay by 1.11% W-F1, 1.29% macro F1, and 0.73% accuracy, demonstrating the benefit of persistent cross-window relay state.Window-local DiaRelay already improves LoRA-only by 1.94% W-F1, 3.55% macro F1, and 1.68% accuracy, but discards its state after each prediction.
  • Component Ablations: Replacing residual updating with the complete current value lowers W-F1 from 70.06% to 69.37%, while removing either dual-axis correction path degrades all three metrics.The complete dual-axis read also improves over the output-only variant by 0.65%, 1.62%, and 0.31% in W-F1, macro F1, and accuracy.

Limitations and Future Work

Despite strong text-only ERC results on MELD and IEMOCAP, DiaRelay’s applicability beyond text-only settings and its ability to explain emotion predictions remain open challenges.

  • Limitations and Future Work: DiaRelay is evaluated primarily in text-only ERC, leaving its applicability to multimodal conversational understanding and broader dialogue tasks unexplored.The passage identifies these settings as directions for future investigation.
  • Limitations and Future Work: The framework focuses on classification performance rather than explicitly identifying the historical evidence supporting each prediction.
  • Limitations and Future Work: DiaRelay does not currently provide natural-language explanations for predicted emotions.

Conclusion

DiaRelay is a lightweight memory-augmented plug-in that gives large language models persistent dialogue-level memory without extending the explicit context window. Its constant-size relay state preserves useful historical emotional evidence across successive utterances, and experiments on MELD and IEMOCAP with Qwen3-4B and Qwen3-8B show its effectiveness.

  • Conclusion: DiaRelay equips large language models with persistent dialogue-level memory without extending the explicit context window.It is designed as a lightweight, memory-augmented plug-in.
  • Conclusion: A constant-size relay state carries useful historical emotional evidence across successive utterances after it leaves the local input window.This allows earlier emotional cues to continue influencing later predictions without enlarging the explicit context window.
  • Conclusion: Experiments on MELD and IEMOCAP with Qwen3-4B and Qwen3-8B demonstrate DiaRelay’s effectiveness.

A1. Brief Introduction to Baselines

This section defines the comparison settings and resources catalogued in Table S5, then describes causal baseline variants used for fair history-only evaluation. It distinguishes future/full-dialogue access and external knowledge from strictly causal text-only comparisons.

  • Baseline comparison scope: Table S5 catalogs the compared methods’ contextual information, auxiliary resources, modalities, and result sources.The table organizes the properties of methods evaluated in the main paper.
  • Baseline comparison scope: “Future/full dialogue” denotes access to later utterances or representations constructed from the complete dialogue.This setting is distinct from using only information available up to the current target utterance.
  • Baseline comparison scope: “External knowledge” covers retrieved demonstrations, generated speaker descriptions, commonsense knowledge, biographies, and other speaker-related information.The category captures auxiliary information beyond the dialogue context itself.
  • Causal baseline variants: Causal-ERC (T) supplies a text-only comparison under causal information constraints, while causal PRC-Emo excludes additional inputs for a fair history-only comparison.The causal PRC-Emo variant is derived from the original framework, which combines emotion-sensitive prompting, demonstration retrieval, and curriculum learning.

A2. More Implementation Details

The implementation preserves causal dialogue processing with a constant-size, dialogue-dependent relay memory and strict dataset-specific decoding. Training uses compact cross-utterance credit assignment, while DiaRelay adds only a small parameter overhead to the frozen backbone.

  • Data processing: Official test splits remain unchanged, dialogues are processed chronologically, and every adapted layer’s relay memory is zero-initialized and reset between dialogues.Training and validation portions are combined for model fitting.
  • Input construction: Each prediction uses the target utterance plus at most four preceding utterances, excludes future turns, and applies memory-conditioned corrections only to target-token positions.The same prompt and explicit context window are used across LoRA-only, ablation, Window-local DiaRelay, and Full DiaRelay variants.
  • Decoding: Predictions are valid only when decoded text exactly matches a dataset-specific label string; unmatched generations are counted as incorrect without normalization, alias mapping, or correction.MELD and IEMOCAP use separate explicitly defined emotion-label sets.
  • Model configuration: The backbone uses 4-bit NF4 quantization with bfloat16 computation; LoRA covers all linear modules, while DiaRelay is inserted into every Transformer layer with constant-size r × r memories.Each adapted layer maintains an independent dialogue-dependent activation rather than a trainable memory parameter.
  • Model configuration: 7,078,176 trainable parameters: DiaRelay adds only approximately 0.09% of the Qwen3-8B backbone while keeping the backbone frozen.LoRA contributes 87,293,952 trainable parameters, and the resulting model has 94,372,128 trainable parameters in total.
  • Cross-utterance gradient span: 1.24 weighted-F1, 3.03 macro-F1, and 1.65 accuracy points: K = 2 is strongest, outperforming K = 1 while exceeding K = 3 and K = 4.K = 2 exceeds K = 3 by 1.76 weighted-F1 points and K = 4 by 0.99 points, so longer differentiable spans are not necessarily more effective.

B1. Mechanism Analysis of DiaRelay

DiaRelay’s two memory-read paths provide complementary historical guidance at distinct stages of self-attention. The query-side path selectively reweights visible evidence, while the output-side path supplements the aggregated representation with relayed history.

  • Query-side memory read: The query-side path adds a history-conditioned bias to attention logits, increasing weights for visible tokens aligned with relayed evidence and downweighting inconsistent tokens.It modifies target-token queries without appending visible tokens or replacing the pretrained attention pattern.
  • Query-side memory read: Figure S2 shows that query-side corrections are nonzero but generally small, with larger attention changes concentrated in selected layers.The relayed memory direction remains strongly aligned with current keys, whereas similarity with queries varies substantially across layers.
  • Output-side memory read: The output-side path directly adds a history-conditioned residual after attention aggregation instead of modifying attention probabilities.Thus, query-side reading controls weighting of currently visible evidence, whereas output-side reading supplements the aggregated target representation.
  • Ablation analysis: Removing either memory-read path degrades all three metrics, while the complete dual-axis read achieves the strongest overall performance; output-only also outperforms query-only.These ablations indicate that direct historical supplementation has the stronger standalone contribution, although combining both paths is best overall.

B2. Ablation Study of Relay Rank

The relay-rank ablation on MELD with Qwen3-8B identifies r = 8 as the best capacity–compactness trade-off. Increasing rank from 4 to 8 improves all reported metrics, while larger ranks provide no further gains.

  • Ablation Study of Relay Rank: The ablation varies only r ∈ {4, 8, 16, 32} on MELD with Qwen3-8B, holding the data split, prompts, context window, training schedule, and reporting rule constant.All variants are evaluated at the third-epoch checkpoint under the MELD reporting protocol.
  • Ablation Study of Relay Rank: r = 8 is selected as the default because larger relay ranks do not improve performance.The main experiments therefore use r = 8 with a compact per-layer memory.
  • Ablation Study of Relay Rank: Increasing relay rank from 4 to 8 improves weighted F1 by 1.59 points, macro F1 by 2.70 points, and accuracy by 0.88 points.These gains indicate that an excessively small relay space limits preservation of diverse dialogue evidence.
  • Ablation Study of Relay Rank: r = 8 exceeds r = 16 by 0.43/1.58/0.15 points and r = 32 by 0.22/1.08/0.31 points in weighted F1, macro F1, and accuracy, respectively.Further increasing the rank therefore does not produce additional gains.
Loading 2608.22745v1…