StreamingDialogue: Prolonged Dialogue Learning via Long Context Compression with Minimal Losses

Standard Large Language Models (LLMs) struggle with handling dialogues with long contexts due to efficiency and consistency issues. According to our observation, dialogue contexts are highly structured, and the special token of \textit{End-of-Utterance} (EoU) in dialogues has the potential to aggregate information. We refer to the EoU tokens as ``conversational attention sinks'' (conv-attn sinks). Accordingly, we introduce StreamingDialogue, which compresses long dialogue history into conv-attn sinks with minimal losses, and thus reduces computational complexity quadratically with the number of sinks (i.e., the number of utterances). Current LLMs already demonstrate the ability to handle long context window, e.g., a window size of 200K or more. To this end, by compressing utterances into EoUs, our method has the potential to handle more than 200K of utterances, resulting in a prolonged dialogue learning. In order to minimize information losses from reconstruction after compression, we design two learning strategies of short-memory reconstruction (SMR) and long-memory reactivation (LMR). Our method outperforms strong baselines in dialogue tasks and achieves a 4 $\times$ speedup while reducing memory usage by 18 $\times$ compared to dense attention recomputation.

Paper

References (59)

Scroll for more · 38 remaining

Similar papers

Peer review

Reviewer wRZP5/10 · confidence 4/52024-06-20

Summary

Standard Large Language Models (LLMs) struggle with handling dialogues with long contexts due to efficiency and consistency issues. This paper finds that the structure of the dialogue context is consistent, and special tokens may aggregate information. Therefore, this paper aims to use special tokens to encode dialogue history information to reduce inference costs and enhance the ability of LLMs to handle long dialogues. To achieve this, it proposes two information reconstruction functions to improve the information aggregation capability of special tokens. Experiments have shown that the article has achieved its intended purpose.

Strengths

1. This paper finds that the separator tokens, namely conversational attention sinks, generally aggregates more attention than other words and tokens. Therefore, this paper proposes StreamingDialogue, which utilizes there special tokens to enhance the capability of LLMs to handle long-context dialogue. 2. StreamingDialogue has achieved good results on multiple dialogue datasets. Analysis experiments also demonstrate that this method is capable of handling long-context dialogues and can reduce inference latency and memory usage.

Weaknesses

1. The training method introduced by StreamingDialogue is overly complex, resulting in the model performing multiple forward passes on the same sample during training, leading to more than three times the training cost. 2. The comparison of different methods is unfair. In the main experiment, StreamingDialogue is fine-tuned on specific datasets, making it evident that it can surpass the non-training method StreamingLLM [1]. Although the authors also explored the non-training setting of the proposed method in Section 4.6, they only conducted experiments on Llama2-7B-chat and evaluated it using only 1-gram and 2-gram metrics. Therefore, the effectiveness and generalizability of the method are not verified. [1] Xiao et al. Efficient Streaming Language Models with Attention Sinks. ICLR 2024.

Questions

1. In line 127-128, the authors mention that by caching only the corresponding conv-attn sinks, the time complexity of attention computation can be reduced from $O(T^2L^2)$ to $O(T^2)$. However, have the authors considered that if each utterance contains $L$ tokens, the time complexity should be $\mathbf{O(T^2L)}$? 2. For the same sample, it would be best for the authors to use the same notation on line 157 and line 175 to avoid confusion.

Rating

5

Confidence

4

Soundness

3

Presentation

2

Contribution

2

Limitations

The authors adequately address the limitations and, if applicable, potential negative societal impact of their work.

Reviewer 4bTd7/10 · confidence 4/52024-07-13

Summary

This paper tackles the challenge of long context dependencies of LLMs in dialogue settings. The authors first posit that end of utterance tokens like "\n" and </s> could conceivably summarize the information in the utterance, and propose to attend to such sinks rather than entire utterances to allow LLMs to perform long-context tasks with lower computational costs. Two learning strategies, SMR and LMR are introduced to encourage EoU tokens to carry key information from preceding utterances, and remember key information from previous EoU tokens. The authors evaluate on multiple dialog datasets, and demonstrate that the proposed approach can significantly improve computational complexity and make it possible to operate on longer dialogs.

Strengths

1. The problem that the paper is tackling is important for the community at large, and the proposed approach seems intuitive and logical. 2. The paper is original, well structured and written, and experiments appear apt to substantiate the authors claims.

Weaknesses

1. The authors do not compare against plausible alternative approaches like infinity former or the compressive transformer, which are also memory based approaches. Comparisons to position interpolation based approaches with RoPE would also be interesting to see.

Questions

1. Line 111: Yes, position interpolation based approaches may not provide for infinitely long sequences, but is that required for dialogue tasks? Perhaps this could be rephrased to make the authors point. 2. Line 119 makes a leap in logic that is perhaps not fully intuitive. The authors claim that higher attention on EoU tokens suggests that these aggregate information. Did the authors test whether the responses of the LLM to conversations implied that high attentions on EoU tokens could possibly capture information from the preceding utterances ? 3. Line 160: Did the authors consider restricting the attention for u' tokens to just the sink token, rather than sink tokens and previous tokens? The current phrasing seems to indicate the former over the latter.

Rating

7

Confidence

4

Soundness

3

Presentation

3

Contribution

3

Limitations

The authors are requested to add notes on limitations and potential negative social impacts. The additional training methods proposed may incur computational cost, and I encourage the authors to comment on this.

Reviewer 7W1D6/10 · confidence 4/52024-07-27

Summary

The paper introduces a novel approach for encoding long conversations. Motivated by the results of StreamingLLM, the authors observe that the end-of-utterance (EOU) or separator tokens aggregate more attention than other tokens in a dialogue generation task. The authors refer to the EOU tokens as conv-att sinks (conversational attention sinks). Based on this observation, the authors propose to attend and cache only the conv-att-sinks of the past utterances to represent the dialogue history, thereby making the space complexity of the attention mechanism linear to the number of turns in a conversation. To learn quality embeddings for conv-attn sinks, the authors propose two auxiliary tasks, SMR (a response reconstruction task) and LMR (a response recall task). The proposed StreamingDialogue encoding strategy achieves comparable performance to dense attention (attention on all previous tokens) and outperforms memory-efficient baselines on Persona-Chat and MSC datasets. The method also exhibits 4× speedup while reducing memory usage by 18× compared to the dense attention strategy.

Strengths

1. The paper is well-written and easy to understand. The proposed method is well-motivated and addresses an important problem of encoding long dialogue contexts. 2. The proposed attention strategy of utilizing only the conv-attn sinks is simple and effective. StreamingDialogue shows better performance than memory-efficient baselines on both automated and human evaluation. The method also shows performance comparable to that of the dense attention strategy. 3. Results suggest that the SMR and LMR help to learn a rich representation of the conv-attn sinks. The authors also show evidence (Fig. 7) that the model can recollect/generate past information from the previous conv-attn sinks. 4. The method is cost-effective and can achieve significant speed-up compared to the dense attention strategy.

Weaknesses

1. Although the results shown in Table 1 are positive, the metrics are not well-suited for the open-domain dialogue generation task. The authors have shown their results on two additional metrics (USL-H and Dial-M) in Table 6 for the MSC dataset. USL-H and Dial-M have been shown to be better metrics than BLEU, ROUGE, Distinct, and perplexity, especially for persona-grounded datasets like Persona-Chat. However, Table 1 does not show the results with USL-H and Dial-M. Also, in the case of MSC, StreamingDialogue performs better than StreamingLLM on the USL-H metric but not on the Dial-M metric. This is why I think that although the method is appealing, the results are not strong enough to support it. 2. There is no information about inter-annotator agreement for the human evaluation. 3. The experimental setup with the Persona-Chat and MSC dataset is not clear. The authors have not mentioned whether they used the persona profiles to generate the responses for the result of Table 1. 4. The use of the BLEU metric is not consistent. The authors use average BLEU in Table 1 and Table 2. However, BLEU-1 and BLEU-2 are shown in Table 3, whereas only BLEU-1 is shown in Table 4. It would be better to show all three variations of BLEU in all the result tables. 5. The results are shown only on two dialogue datasets. There are other datasets with long dialogue contexts like Topical-chat. MultiWOZ is another dataset for task-oriented dialogue systems, which includes lots of conversations where the user utterance directly refers to past dialogue history.

Questions

1. Why did the authors not use USL-H and Dial-M for Table 1? 2. Did the authors use the persona profiles to generate the responses? If yes, how was it included in the context? If not, is it fair to compare BigBird and StreamingLLM with StreamingDialogue? 3. Explain the inconsistent use of the BLEU metric. 4. Why are Layer 0 and Layer 1 shown in Fig. 1a, whereas Layer 28 is shown in Fig. 1b? 5. Did the authors analyze the conv-attn sinks for the example in Fig. 7?

Rating

6

Confidence

4

Soundness

3

Presentation

3

Contribution

3

Limitations

yes

Reviewer 7W1D2024-08-10

Response to Rebuttal

Thank you for the detailed response. I appreciate the effort in sharing the results on Topical-Chat and MultiWOZ datasets. I have updated my scores. However, I still have the following questions and concerns. 1. For Topical-Chat, did you use the grounding knowledge to generate the response? 2. For MultiWOZ, did you use the belief states to generate the response? 3. In the Persona-Chat dataset, the users pick one or more persona from their assigned profile to generate the responses. Now, if the generation of the response is not conditioned on the persona, then the model tends to produce responses that reduce perplexity. As a result, even though the response is not persona-grounded, it may achieve better BLEU scores. So, in my opinion, grounding knowledge should be included in the dialogue context for any kind of knowledge-grounded response generation task. Otherwise, it does not provide the complete picture. This is why I am still skeptical about the soundness of the result.

Authorsrebuttal2024-08-12

Response to Reviewer 7W1D

Thank you for your feedback. We sincerely hope that the subsequent responses could resolve your concerns. > For Topical-Chat, did you use the grounding knowledge to generate the response? For MultiWOZ, did you use the belief states to generate the response? We did not use either the grounding knowledge from Topical-Chat or the belief states from MultiWOZ for generation. > Grounding knowledge should be included in the dialogue context for any kind of knowledge-grounded response generation task. Thank you for your comment. We have conducted experiments under the setting that includes grounding knowledge. For MultiWOZ, we added the belief states before each corresponding utterance. The results are shown in the table below. |**Method**|**PPL**|**BLEU**|**BLEU-1**|**BLEU-2**|**Distinct-1**|**Distinct-2**|**Distinct-3**| |-|-|-|-|-|-|-|-| |Dense|1.92|25.56|48.33|29.14|3.74|6.86|8.89| |StreamingLLM|2.19|25.70|47.53|29.21|4.48|9.09|12.60| |Ours|1.98|25.77|48.58|29.38|5.30|10.03|13.60| Since our method retains historical information by compressing each utterance's information into conv-attn sinks, only the conv-attn sinks from the previous utterances will be attended to in subsequent utterances. Therefore, for Topical-Chat and Persona-Chat, we considered two settings: 1. We treated each sentence of the grounding knowledge/persona profiles as an utterance, and the subsequent utterances could only attend to their conv-attn sinks. The results are shown in the table below. |**Data**|**Method**|**PPL**|**Distinct-2**|**Distinct-3**|**Dial-M**| |-|-|-|-|-|-| |PersonaChat|Dense|7.19|43.56|66.27|2.53| ||StreamingLLM|8.36|33.17|53.58|2.47| ||Ours|7.60|39.16|61.06|2.36| |Topical-Chat|Dense|3.24|39.07|57.64|4.32| ||StreamingLLM|8.31|16.87|23.56|3.72| ||Ours|3.20|31.47|49.10|2.57| 2. We used the grounding knowledge/persona profiles as a prompt:"The conversation will be based on the following knowledge: &lt;knowledge&gt; {detailed knowledge} &lt;conversation&gt;" in Topical-Chat and "The conversation will be based on the following persona profile: &lt;persona&gt; {detailed persona profiles} &lt;conversation&gt;" in Persona-Chat, allowing the subsequent utterances to fully attend to it. The results are shown in the table below. |**Data**|**Method**|**PPL**|**Distinct-2**|**Distinct-3**|**Dial-M**| |-|-|-|-|-|-| |PersonaChat|Dense|7.93|44.26|66.63|2.48| ||StreamingLLM|7.99|36.40|57.44|2.91| ||Ours|7.67|37.82|58.93|2.57| |Topical-Chat|Dense|11.64|36.98|54.96|4.60| ||StreamingLLM|30.37|26.07|34.26|3.61| ||Ours|10.21|32.16|50.41|2.97| In the setting that includes grounding knowledge, our method consistently retains memory of both grounding knowledge and historical dialogue. As a result, our method still outperforms the baseline, except for dense attention. As an efficient algorithm, our method can significantly improve speed compared to dense attention while maintaining the contextual and character consistency of long conversations.

Reviewer 7W1D2024-08-12

Response to Rebuttal

Thanks for conducting the additional experiments. I have one final question. Could you please elaborate on the process of including the grounding knowledge in the context? Do you include the knowledge only once or update the knowledge after each turn?

Authorsrebuttal2024-08-12

Response to Reviewer 7W1D

Thank you for your feedback. In all datasets, the knowledge is included only once. Specifically, for Topical-Chat and Persona-Chat, we concatenate the grounding knowledge related to each conversation at the beginning of that conversation. For MultiWOZ, we prepend the belief state of each utterance to the beginning of that utterance.

Reviewer 7W1D2024-08-12

Response to Rebuttal

Thank you for the response. I have updated my scores.

Reviewer 4bTd2024-08-09

I thank the authors for their responses to questions and comments. Based on their response, I will retain my score. However, I encourage the authors to consider the following: 1. The authors test on MSC and PersonaChat, both of which do not exceed the max length of LLama. Therefore, I question the assertion that they develop an approach for theoretically infinite sequences. Since their approach performs worse than PI-based approaches on some metrics, does this mean that the approach does not work well enough for these sequence lengths? Additional comments or analysis on this aspect would be helpful. 2. Regarding the case study, thanks for including it. However, there may be a more structured approach using multiple prompts to test this and obtain aggregate conclusions. I recommend that the authors repeat this over multiple prompts to demonstrate convincing evidence in the final paper.

Authorsrebuttal2024-08-12

Response to Reviewer 4bTd

Thank you for your feedback. We sincerely hope that the subsequent responses could resolve your concerns. > The authors test on MSC and PersonaChat, both of which do not exceed the max length of LLama. Therefore, I question the assertion that they develop an approach for theoretically infinite sequences. Since their approach performs worse than PI-based approaches on some metrics, does this mean that the approach does not work well enough for these sequence lengths? Additional comments or analysis on this aspect would be helpful. For infinite sequences, PI-based approaches do not reduce the KV caches during inference, resulting in time and space complexity the same as dense attention. This makes them prone to out-of-memory errors and unsuitable for infinite texts. In contrast, our method has demonstrated stable performance even with lengths exceeding 25K tokens. For texts within the training length of LLaMA, there is no need to use PI-based approaches on MSC and PersonaChat since PI-based approaches are designed for length extrapolation, i.e., when the inference length exceeds the training length. Additionally, these PI-based approaches employ dense attention, allowing them to attend to the full context. However, our method, as a sparse attention approach, can only attend to a small portion of the tokens, which reasonably explains why it might underperform compared to PI-based approaches on some metrics. > Regarding the case study, thanks for including it. However, there may be a more structured approach using multiple prompts to test this and obtain aggregate conclusions. I recommend that the authors repeat this over multiple prompts to demonstrate convincing evidence in the final paper. Thank you for your suggestion. We designed 10 prompt formats, each with 20 specific samples, limiting the inference to only see the last utterance and the dialogue history's conv-attn sinks. We used an untrained Llama-2-7B-Chat model for inference and tested the proportion of responses that accurately include key information. Examples of prompt formats are as follows: 1. "template": "A and B went to PLACE today.&lt;/s&gt;They had a great time.&lt;/s&gt;Who did A go to PLACE with today?&lt;/s&gt;", "keywords": {"A": "person", "B": "person", "PLACE": "place"}, "answer_key": "B" 2. "template": "B made A's favorite food, FOOD, today.&lt;/s&gt;A was delighted.&lt;/s&gt;What food did B make for A today?&lt;/s&gt;", "keywords": {"A": "person", "B": "person", "FOOD": "food"}, "answer_key": "FOOD" 3. "template": "A was doing ACTIVITY when B called.&lt;/s&gt;A had to stop and answer the call.&lt;/s&gt;What was A doing when B called?&lt;/s&gt;", "keywords": {"A": "person", "B": "person", "ACTIVITY": "activity"}, "answer_key": "ACTIVITY" 4. "template": "A bought a new ITEM today.&lt;/s&gt;B was impressed by A's purchase.&lt;/s&gt;What item did A buy today?&lt;/s&gt;", "keywords": {"A": "person", "B": "person", "ITEM": "item"}, "answer_key": "ITEM" 5. "template": "A participated in an EVENT today.&lt;/s&gt;B cheered them on.&lt;/s&gt;What event did A participate in?&lt;/s&gt;", "keywords": {"A": "person", "B": "person", "EVENT": "event"}, "answer_key": "EVENT" *The "keywords" will be replaced with specific content.* The test results showed that the proportion of responses accurately including key information was 68.00\%, indicating that the EoU tokens indeed have the ability to aggregate information by drawing more attention. We will include these results in the revision.

Reviewer 4bTd2024-08-12

I thank the authors for their responses. All my questions are addressed satisfactorily.

Authorsrebuttal2024-08-12

Looking forward to your feedback

We highly appreciate your valuable time spent in reviewing our work. The insights and contributions you have made to improve the quality of our submission are sincerely acknowledged. We would like to inquire whether our response adequately addressed your questions. Your feedback holds immense value to us, and we eagerly await your reply.

Authorsrebuttal2024-08-13

Again, looking forward to your feedback

We are reaching out to follow up on our previous reply, as we have yet to receive your feedback. We are keen to know whether the information we shared has fully addressed your concerns or if there is more we can do to assist. We truly value the time and effort you have dedicated to reviewing our work, especially considering your busy schedule. Your expertise and feedback are important to us, and we would deeply appreciate it. Thank you very much for your time and consideration.

Program Chairsdecision2024-09-25

Decision

Accept (poster)

© 2026 NYSGPT2525 LLC