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

LLM Task Interference: An Initial Study on the Impact of Task-Switch in Conversational History

Akash Gupta, Ivaxi Sheth, Vyas Raina, Mark J. F. Gales, Mario Fritz

Abstract

Large Language Models (LLMs) rely heavily on conversational history for context and in-context learning. However, this study identifies a critical vulnerability termed task-switch interference. When a user abruptly changes the nature of the task within a single session, the preceding history can act as a "distractor," significantly degrading performance on the new target task. We evaluate popular models including GPT-4, Llama-2, and Mistral-7B, demonstrating that irrelevant history can lead to accuracy drops of over 20% and frequent formatting failures.

Introduction

The prevailing paradigm in LLM interaction assumes that more context is generally better. By leveraging conversational history, models can maintain state and learn from few-shot examples. However, because LLMs are auto-regressive—generating each token based on the entire preceding sequence—the "weight" of past interactions can become a liability. This paper investigates the "task-switch" problem: the phenomenon where a model's internal state remains biased toward a previous task, interfering with its ability to execute a new, unrelated request.

The Task-Switch Problem

Task-switch interference occurs when a transition from a Conversation History (CH) task ($T_h$) to a Target task ($T_t$) causes the model to hallucinate patterns or formats from $T_h$ into its response for $T_t$.

Illustration of task-switch interference where previous sentiment analysis history causes a model to fail an algebra problem.

As shown in the figure above, a model conditioned on sentiment analysis tasks may incorrectly attempt to classify the sentiment of a math word problem rather than solving it. This "task pollution" suggests that LLMs struggle to "flush" irrelevant context when the user's intent shifts.

Methodology

The researchers evaluated interference by comparing zero-shot performance (no history) against performance following a task switch. They introduced the τ (Tau) Metric, a reference-free sensitivity measure that tracks changes in the model's log-probability (confidence) for its own zero-shot predictions after history is introduced. High τ values indicate significant internal disruption.

The study utilized five diverse datasets to simulate different task types: Gigaword (Summarization), MMLU Abstract Algebra (Math), TweetQA (Social QA), Rotten Tomatoes (Sentiment), and MMLU Human Aging (Social Science).

Empirical Results

The impact of task-switching is both widespread and model-dependent. Across 15 task-switch combinations, most models exhibited notable performance degradation.

Accuracy change relative to conversation history length across different models and tasks.

Key Findings:

  1. Performance Drops: Mistral-7B experienced a 22.56% drop in summarization accuracy when preceded by math problems. Llama-2-7B was particularly vulnerable, with τ values reaching as high as 31.51.
  2. History Length: As illustrated in the figure above, increasing the length of the distractor history ($L$) generally correlates with decreased accuracy on the target task, often plateauing after 4–6 turns.
  3. Format Failure: One of the most striking findings was that task-switching often causes "format errors." Models frequently failed to follow output instructions (e.g., using specific tags) when the previous task utilized a different format.
  4. Confidence Sink: Even when models provided correct answers, their internal confidence often plummeted, making them less reliable for systems that gate outputs based on probability thresholds.

Conclusion

This study highlights that conversational memory is a double-edged sword. While essential for continuity, it can severely compromise model reliability during task transitions. Future work should focus on "adaptive context management"—developing mechanisms that allow LLMs to recognize task boundaries and selectively de-prioritize irrelevant historical context to prevent interference.

Summary updated

BibTeX
@inproceedings{gupta2024llm,
  author = {Akash Gupta and Ivaxi Sheth and Vyas Raina and Mark J. F. Gales and Mario Fritz},
  title = {{LLM Task Interference: An Initial Study on the Impact of Task-Switch in Conversational History}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2024},
  doi = {10.18653/v1/2024.emnlp-main.811},
}
Figure