Modern Large Language Models (LLMs) boast context windows spanning hundreds of thousands of tokens. Intuitively, providing more context—whether through massive prompts, extensive retrieval-augmented generation (RAG) documents, or detailed agent trajectories—should empower models to make better decisions.
However, empirical evidence reveals a paradox: as context size grows, reasoning performance often degrades. This degradation stems from contextual noise. When a model is forced to process irrelevant background information, its attention mechanism becomes diluted. It falls prey to spurious correlations or suffers from the "lost in the middle" phenomenon, where critical information buried deep within a prompt is ignored.
To combat this, a rapidly growing body of research treats context management not merely as a computational optimization problem, but as a denoising process. By filtering out irrelevant tokens, segments, or external knowledge before or during inference, we can actively improve downstream task accuracy.
Token-Level and Extractive Prompt Denoising
The most direct way to reduce contextual noise is to clean the prompt before it ever reaches the primary model. Traditional prompt engineering relies on natural language instructions (e.g., "ignore irrelevant information"), but Guang Huang et al. demonstrate in Beyond Prompt Engineering: A Reinforced Token-Level Input Refinement for Large Language Models that physically removing irrelevant tokens via reinforcement learning is far superior. Direct sequence pruning reduces cognitive load and prevents the dilution of relevant information.
To identify which tokens to prune, early frameworks like LLMLingua by Huiqiang Jiang et al. (LLMLingua: Compressing Prompts for Accelerated Inference of Large Language Models) used smaller, well-aligned models to calculate token perplexity and prune redundant elements, showing that aggressive compression acts as a denoiser that boosts reasoning. To better handle long-context scenarios, Huiqiang Jiang et al. extended this in LongLLMLingua: Accelerating and Enhancing LLMs in Long Context Scenarios via Prompt Compression by strategically reordering and filtering context to mitigate the "lost in the middle" problem.
Rather than relying solely on perplexity, Wenshan Wang et al. introduced QUITO (QUITO: Accelerating Long-Context Reasoning through Query-Guided Context Compression), which uses a tiny 0.5B parameter model to filter tokens based on query-guided attention. They found that pruning query-irrelevant tokens yields higher accuracy than providing the full, uncompressed context. Similarly, Jingyu Liu et al. developed Speculative Prefill: Turbocharging TTFT with Lightweight and Training-Free Token Importance Estimation, and Shubhangi Upasani et al. explored Cross-Family Speculative Prefill: Training-Free Long-Context Compression with Small Draft Models, both confirming that removing less important tokens simplifies the input for the target model, allowing it to focus strictly on the core signal.
Interestingly, complex token-level pruning isn't always required. A systematic study by Sehoon Kim et al. (Characterizing Prompt Compression Methods for Long Context Inference) revealed that simple extractive compression—ranking and selecting text chunks rather than individual tokens—consistently mitigates performance degradation by isolating the most pertinent segments and filtering out the rest.
Dynamic KV Cache Eviction as a Reasoning Filter
Denoising can also happen dynamically during the generation phase by managing the model's internal memory: the Key-Value (KV) cache. Storing every token's history introduces cumulative noise that can derail long-context generation.
To solve this, Yu Bai et al. proposed CItruS (CItruS: Chunked Instruction-aware State Eviction for Long Sequence Modeling), which uses the user's specific instruction to evict irrelevant states from the cache. By removing distracting information, the model achieves better performance than full-context processing.
At the architectural level, Zhongwei Wan et al. developed $\text{D}_{2}\text{O}$ ($\text{D}_{2}\text{O}$: Dynamic Discriminative Operations for Efficient Long-Context Inference of Large Language Models), which dynamically allocates cache budgets across layers and merges tokens to filter out irrelevant data. In reasoning-heavy models that generate massive chains of thought, Zefan Cai shows in R-KV: Redundancy-aware KV Cache Compression for Reasoning Models that evicting redundant tokens can actually exceed the accuracy of the uncompressed model by acting as a reasoning filter.
Similarly, Wen Hu demonstrates in CAKE: Cascading and Adaptive KV Cache Eviction with Layer Preferences that selective cache eviction acts as a noise filter that emphasizes salient information, proving that a full history can actively hinder a model's focus. Additionally, Jing Xiong et al. leverage uncertainty metrics in UNComp: Uncertainty-Aware Long-Context Compressor for Efficient Large Language Model Inference to filter out redundant tokens, reinforcing that high-density context storage often contains distracting information.
Context Denoising in Retrieval and Agentic Workflows
The need for noise reduction is especially acute when models interact with external environments or databases. In Retrieval-Augmented Generation (RAG), systems often pull in documents containing irrelevant distractors that trigger hallucinations.
Sha Li addresses this in Oreo: A Plug-in Context Reconstructor to Enhance Retrieval-Augmented Generation, showing that compressing retrieved documents by over 90% significantly lowers the noise-to-signal ratio, leading to more precise reasoning. For multi-vector retrieval, Junlin Li developed POQD (POQD: Performance-Oriented Query Decomposer for Multi-vector retrieval) to automatically strip away non-essential sub-queries and filler phrases that introduce noise into retrieval pipelines. When dealing with massive documents, Wei Shi et al. utilize an automated filtering module in SEGMENT+: Long Text Processing with Short-Context Language Models to discard irrelevant segments early, preventing downstream distraction.
This principle extends to dialogue and graph-based knowledge injection. Jun Zhang 0098 et al. implement a gating mechanism in KERS: A Knowledge-Enhanced Framework for Recommendation Dialog Systems with Multiple Subgoals to compare retrieved external information against the current conversation context, filtering out factually correct but contextually inappropriate information. In graph-based document matching, Jing Yao et al. (CDSM: Cascaded Deep Semantic Matching on Textual Graphs Leveraging Ad-hoc Neighbor Selection) use an ad-hoc selector to filter out noisy neighbors, preventing performance degradation caused by background noise accumulation. For visual dialog, Shunyu Zhang et al. (Reasoning with Multi-Structure Commonsense Knowledge in Visual Dialog) filter external knowledge bases against the immediate question to purify the reasoning process.
In agentic workflows, providing full past trajectories can overwhelm an agent. Ruiwen Zhou et al. demonstrate in TRAD: Enhancing LLM Agents with Step-Wise Thought Retrieval and Aligned Decision that limiting in-context examples to high-relevance snippets instead of full trajectories mitigates the negative effects of distractor information. Similarly, in environment interaction, Arthur Chen et al. (Test-Time Adaptation for LLM Agents via Environment Interaction) emphasize that filtering extracted environment rules to remove trivial or redundant observations is essential to prevent context clutter from obscuring relevant causal information.
Why Context Denoising Works: Building Intuition
Why does removing data make a model smarter? The answer lies in how language models process correlations and manage information density.
First, models are highly susceptible to spurious correlations. In dialogue systems, for instance, Lizhen Qu et al. (Less is More: Mitigate Spurious Correlations for Open-Domain Dialogue Response Generation Models by Causal Discovery) show that restricting a model's input to strictly causal utterances allows smaller architectures to match the performance of much larger models. Removing non-causal noise is simply more impactful than expanding parameter counts or context windows.
Second, context denoising can be framed as a fundamental architectural requirement. Chang Liu et al. demonstrate in Aspect-based Sentiment Analysis with Context Denoising that explicitly filtering out syntactically distant or irrelevant terms provides significant performance gains across models of all scales, from small encoders to large generative models.
Finally, mechanistic interpretability offers a clear information-theoretic explanation. Haolin Yang 0003 et al. discover in Binary Autoencoder for Mechanistic Interpretability of Large Language Models that in-context learning fundamentally functions as an information deletion mechanism. As more demonstrations or contexts are processed, the entropy of the model's hidden states measurably decreases:
$$\Delta H(\text{Hidden States}) < 0$$
The model is actively working to filter out irrelevant noise and narrow its focus to task-specific signals. By designing explicit context denoising frameworks—whether through token pruning, cache eviction, or knowledge gating—we align directly with this internal mechanism. We relieve the model of the burden of information deletion, allowing its attention layers to focus entirely on synthesizing the correct answer.
Key Foundational Work
KERS: A Knowledge-Enhanced Framework for Recommendation Dialog Systems with Multiple Subgoals (2021) — contributed 2 concept elements to this direction.
Reasoning with Multi-Structure Commonsense Knowledge in Visual Dialog (2022) — contributed 1 concept elements to this direction.
Incorporating External Knowledge to Enhance Tabular Reasoning (2021) — contributed 1 concept elements to this direction.