DiaRelay: Relaying Dialogue Context with a Constant-Size Memory for Emotion Recognition in Conversation
The paper proposes DiaRelay, a lightweight LoRA-based adapter that enables large language models to maintain a constant-size dialogue-level memory for emotion recognition in conversation, effectively capturing long-range emotional cues without re-encoding history or increasing context length while achieving state-of-the-art performance with minimal trainable parameters.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Human conversation is a delicate tapestry where meaning often hides not in the words spoken at this exact moment, but in the quiet echoes of what was said long before. To understand why a person is afraid, sad, or angry, we rarely look at a single sentence in isolation. Instead, we rely on the history of the interaction: a past argument, a shared joke, or a previous worry that lingers in the air. Teaching computers to do the same has long been a stumbling block for artificial intelligence. While modern language models are brilliant at processing vast amounts of text, they struggle to hold onto the emotional thread of a conversation as it unfolds over time. When a dialogue grows, the computer's memory of the beginning often fades, or it becomes so overwhelmed by the sheer volume of past words that it loses focus on the most relevant details. This limitation makes it difficult for machines to recognize emotions accurately in real-world conversations, where the key to understanding a feeling might be buried in a comment made ten turns ago.
Researchers have tried to solve this by simply giving the computer a larger window of text to read, but this approach has a cost. A wider window requires the computer to re-read and re-process the same old sentences over and over again, which slows everything down and consumes massive amounts of computing power. Other methods try to store a summary of the conversation, but these summaries often fail to capture the specific, subtle emotional cues needed to distinguish between similar feelings like fear and surprise. The challenge, then, is to create a system that can remember the important emotional history without getting bogged down by the sheer weight of the past.
To address this, a team of researchers has developed a new, lightweight tool called DiaRelay. Think of this tool as a specialized notebook that a computer carries with it as it listens to a conversation. Unlike a standard notebook that might fill up with every single word spoken, this notebook is designed to hold only the most essential emotional context in a fixed, manageable space. As the computer listens to each new sentence, it does not just read the current words; it also consults this small, evolving notebook. The notebook contains a distilled version of the emotional history, updated continuously as the conversation progresses. This allows the computer to recall a worry expressed minutes ago or a joke told earlier in the day, even if those specific words have already fallen out of the immediate text window the computer is currently reading.
The system works through two main actions that happen in a precise order. First, after the computer makes a prediction about the emotion of the current sentence, it updates its notebook. It carefully decides what new emotional information to write down and what old information to keep, ensuring the notebook remains full of relevant clues without becoming cluttered. It does not simply dump the entire current sentence into the memory; instead, it writes down only the new emotional "residue"—the parts of the feeling that were not already captured in the existing memory. This ensures that the notebook stays efficient and focused on what has changed. Second, before the computer predicts the emotion of the next sentence, it reads from this notebook. It uses the stored history to adjust its understanding of the current words, effectively letting the past influence the present. This happens without the computer needing to re-read the entire history or perform complex calculations that would slow it down.
The researchers tested this approach on two major datasets of human conversations, one featuring dyadic interactions and the other involving groups of people. They compared their new system against existing methods that rely on large language models. The results showed that by using this constant-size memory, the system could identify emotions with greater accuracy than previous methods, even when the relevant emotional clues were far back in the conversation history. In one specific test, the system correctly identified a character's fear in a scene where the immediate context suggested a neutral tone, but a distant accusation from earlier in the dialogue provided the true emotional weight. In another case, it recognized sadness in a character's self-doubt by recalling a failed audition mentioned much earlier, whereas other models misinterpreted the emotion as fear because they lacked that distant context.
The study found that this method works well without needing to retrain the entire massive language model or add extra layers of complex data. It adds only a tiny fraction of new parameters to the system, making it a highly efficient solution. The researchers demonstrated that this approach allows the computer to maintain a persistent sense of the conversation's emotional arc, bridging the gap between the immediate words and the distant history that gives them meaning. By keeping a constant-size, evolving memory of the dialogue, the system can recognize emotions that would otherwise be invisible to a model that only looks at the last few sentences. This suggests a promising path forward for creating artificial intelligence that can truly understand the flow of human emotion, not just the words spoken in the moment.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.