[Paper Review] Recursively Summarizing Enables Long-Term Dialogue Memory in Large Language Models
The paper proposes recursively generating memory summaries with LLMs to enhance long-term dialogue memory, evaluated on MSC using ChatGPT and text-davinci-003, showing improved consistency especially in later sessions.
Recently, large language models (LLMs), such as GPT-4, stand out remarkable conversational abilities, enabling them to engage in dynamic and contextually relevant dialogues across a wide range of topics. However, given a long conversation, these chatbots fail to recall past information and tend to generate inconsistent responses. To address this, we propose to recursively generate summaries/ memory using large language models (LLMs) to enhance long-term memory ability. Specifically, our method first stimulates LLMs to memorize small dialogue contexts and then recursively produce new memory using previous memory and following contexts. Finally, the chatbot can easily generate a highly consistent response with the help of the latest memory. We evaluate our method on both open and closed LLMs, and the experiments on the widely-used public dataset show that our method can generate more consistent responses in a long-context conversation. Also, we show that our strategy could nicely complement both long-context (e.g., 8K and 16K) and retrieval-enhanced LLMs, bringing further long-term dialogue performance. Notably, our method is a potential solution to enable the LLM to model the extremely long context. The code and scripts are released.
Motivation & Objective
- Address forgetting in open-domain long-term dialogue without labeled data or extra tools.
- Propose a memory management scheme that recursively updates summaries (memory) from short contexts.
- Enable a response generator to use the latest memory for coherent long-context replies.
- Demonstrate effectiveness and robustness across different LLMs and analyze potential gains from few-shot prompts.
Proposed method
- Treat LLMs as both memory manager and response generator.
- Memory update: M_s = LLM(C_{t-1}, M_{s-1}, P_m) where C_{t-1} is a short context and P_m is the memory-management prompt.
- Response generation: r_t = LLM(C_t, M_s, P_r) where P_r is the response-prompt.
- Memory is updated recursively by combining previous memory with new utterances to create coherent long-term memory.
- Evaluation with fixed LLMs (ChatGPT, text-davinci-003) on the MSC dataset.
- Compare against baselines including All Context, Part Context, and Gold Memory.
Experimental results
Research questions
- RQ1Can LLMs develop long-term dialogue memory without labeled data or extra tools by recursively summarizing past interactions?
- RQ2Does predicted (recursively generated) memory yield more consistent and coherent responses in long-term conversations compared to using raw context or partial context?
- RQ3Is the approach robust across different LLMs and can it benefit from few-shot in-context learning?
Key findings
- Predicted Memory often yields the best performance, especially in later MSC sessions (Session4 and Session5).
- Generated memory achieves substantial F1 and BLEU-2 improvements over baselines and can outperform Gold Memory in some metrics.
- Memory predictions show higher coherence and integration of long-term information into responses than using all context or partial context.
- The method is robust to different LLMs (e.g., ChatGPT and text-davinci-003).
- Few-shot prompting (one labeled example) further improves memory quality and response performance.
- The approach can suffer from hallucinations in memory (causal relationships may be incorrect) and requires future work to mitigate.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.