NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

In-context Interference in Chat-based Large Language Models

Eric Nuertey Coleman, Julio Hurtado, Vincenzo LomonacoarXiv 2023

TL;DR

When you continually add new information to a chat session, Large Language Models (LLMs) suffer from "in-context interference," causing them to forget previously learned facts. This paper introduces a simplified benchmark based on the bAbI dataset to track this degradation and reveals a surprising twist: simply deleting older context preserves model accuracy far better than summarizing it.

What Problem Does This Paper Address?

When interacting with LLMs in a standard chat session, users cannot modify the model's underlying weights. Instead, they rely on in-context learning—feeding new facts directly into the prompt so the model can use them during the conversation.

While LLMs are remarkably good at maintaining fluid conversations, their ability to accumulate and retain a continuous stream of new knowledge within a single session is poorly understood. The authors address a critical gap: Does adding new information cause the model to forget what it learned earlier in the same chat? They discover that LLMs suffer from an information-level equivalent of "catastrophic forgetting," where new context interferes with old context, degrading performance over time.

Methods

The authors evaluated the open-source Vicuna-13B model (a LLaMA-based architecture) using a sequential testing framework. At each time step $i$, they provided the model with a new fact or story ($s_i$) and then asked it questions ($q_{\le i}$) about all the stories presented up to that point. This allowed them to track exactly when and how the model began to forget earlier information.

To combat this interference, they tested two mitigation strategies:

  1. Summarization: Using the LLM's built-in capabilities to compress previous stories in the context window, keeping only what seemed strictly necessary.
  2. Removal (Sliding Window): Completely deleting older stories from the context, maintaining a strict buffer of only the 6 most recent stories.

Datasets

The authors created a new evaluation benchmark by modifying a subset of the well-known bAbI dataset. To isolate the model's retention capacity from raw reasoning complexity, they introduced two key modifications:

  • Unique Entity Names: They replaced default names with unique names to prevent the model from confusing different characters.
  • Structural Simplification ("Short Stories"): They stripped the stories down to just their last two statements and a single question about the last entity mentioned.

A comparison of the original full stories versus the modified short stories is illustrated below:

Figure 1: Modifications were made to the original sto- ries to simplify the problem. First, we replace all default names with unique names to minimize the risk of confu- sion. Second, we shortened the story, leaving only the last two sentences, removing the complexity of reason- ing.

Key Insights and Ideas

  • In-Context Catastrophic Forgetting: Unlike traditional catastrophic forgetting, which happens when model weights are updated with new tasks, in-context interference happens purely at the information level. The weights remain static, but the model loses the ability to locate relevant facts within a crowded context window.
  • The Failure of Summarization: Intuitively, summarizing past context should help by compressing information. However, the authors found that summarization actually accelerated forgetting. They hypothesize that the model becomes confused by its own generated responses and summaries remaining in the context history.
  • Less is More: Simply dropping old stories entirely (the removal strategy) was highly effective. By reducing the total token count, the model faced less noise and maintained a significantly higher accuracy over long sequences.

Key Results

  • Baseline Performance: In a single-story context, the full bAbI stories yielded only 58% accuracy due to their complexity. The simplified "Short Stories" achieved a perfect 100% baseline accuracy.
  • Performance Degradation: As new short stories were incrementally added to the context, accuracy steadily dropped from 100% down to approximately 75% by the 8th story, confirming the presence of in-context interference.
Figure 2: Evolution of the accuracy as we increase the number of stories in the context. As expected, as we increase the information in the context, we observed a decrease in the performance of the model.
  • Mitigation Comparison: When extending the experiment to 19 stories, the Summarization strategy caused accuracy to plummet to nearly 50%. Meanwhile, the Removal strategy (keeping a buffer of 6 stories) successfully mitigated the interference, keeping accuracy stable between 75% and 85%.
Figure 3: To mitigate the interference, we propose sum- marizing or removing previous information. By sum- marizing the previous story, we expect the model to keep only relevant information, however we observed a constant decrease in the performance. On the other hand, by removing old stories and keeping only 6 in the buffer, the model is able to reduce the interference.
  • Computational Overhead: Processing larger contexts significantly increased latency. The time to generate an answer for the short stories nearly doubled from 34 seconds (1 story) to 63 seconds (5 stories).

Limitations and Future Work

The primary limitation acknowledged by the authors is that their experiments were restricted to a single model architecture (Vicuna-13B).

For future work, they aim to expand this line of research to explore how the accumulation of in-context learning interacts with, or potentially interferes with, the pre-trained internal knowledge already stored within the model's static weights and adapters.

Summary updated

BibTeX
@misc{coleman2023context,
  author = {Eric Nuertey Coleman and Julio Hurtado and Vincenzo Lomonaco},
  title = {{In-context Interference in Chat-based Large Language Models}},
  year = {2023},
  eprint = {2309.12727},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2309.12727},
}
Figure