Beyond Hard and Soft: Hybrid Context Compression for Balancing Local and Global Information Retention
On the map: Efficient LLM inference and serving → Prompt and context compression
Abstract (arXiv)
Large Language Models (LLMs) encounter significant challenges in long-sequence inference due to computational inefficiency and redundant processing, driving interest in context compression techniques. Existing methods often rely on token importance to perform hard local compression or encode context into latent representations for soft global compression. However, the uneven distribution of textual content relevance and the diversity of demands for user instructions mean these approaches frequently lead to the loss of potentially valuable information. To address this, we propose Hybrid Context Compression (HyCo2) for LLMs, which integrates both global and local perspectives to guide context compression while retaining both the essential semantics and critical details for task completion. Specifically, we employ a hybrid adapter to refine global semantics with the global view, based on the observation that different adapters excel at different tasks. Then we incorporate a classification layer that assigns a retention probability to each context token based on the local view, determining whether it should be retained or discarded. To foster a balanced integration of global and local compression, we introduce auxiliary paraphrasing and completion pretraining before instruction tuning. This promotes a synergistic integration that emphasizes instruction-relevant information while preserving essential local details, ultimately balancing local and global information retention in context compression. Experiments show that our HyCo2 method significantly enhances long-text reasoning while reducing token usage. It improves the performance of various LLM series by an average of 13.1% across seven knowledge-intensive QA benchmarks. Moreover, HyCo2 matches the performance of uncompressed methods while reducing token consumption by 88.8%.
Key facts. Cited by 7 papers in the map (data through 14 Oct 2026). Placed in Prompt and context compression, one of 12 directions in Efficient LLM inference and serving. Builds on 61 of its 72 references that are in the map. First posted on arXiv 21 May 2025.
Builds on
61 of 72 references.
Closest ancestors · 14
Same direction, newest first
- 2025Understanding and Improving Information Preservation in Prompt Compression for LLMs24 Mar
- 2024A Silver Bullet or a Compromise for Full Attention? A Comprehensive Study of Gist Token-based Context Compression23 Dec
- 2024EXIT: Context-Aware Extractive Compression for Enhancing Retrieval-Augmented Generation17 Dec
- 2024Prompt Compression for Large Language Models: A Survey16 Oct
- 2024Selection-p: Self-Supervised Task-Agnostic Prompt Compression for Faithfulness and Transferability15 Oct
- 2024TACO-RL: Task Aware Prompt Compression Optimization with Reinforcement Learning19 Sep
- 2024AdaComp: Extractive Context Compression with Adaptive Predictor for Retrieval-Augmented Large Language Models3 Sep
- 2024500xCompressor: Generalized Prompt Compression for Large Language Models6 Aug
- 2024Characterizing Prompt Compression Methods for Long Context Inference11 Jul
- 2024xRAG: Extreme Context Compression for Retrieval-augmented Generation with One Token22 May
- 2024LLMLingua-2: Data Distillation for Efficient and Faithful Task-Agnostic Prompt Compression19 Mar
- 2023LongLLMLingua: Accelerating and Enhancing LLMs in Long Context Scenarios via Prompt Compression10 Oct
2 more
Other references · 47
- 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,305
- 2023GPT-4 Technical Reportcited by 18,396
- 2024The Llama 3 Herd of Modelscited by 14,715
- 2023Visual Instruction Tuningcited by 7,869
- 2023BLIP-2: Bootstrapping Language-Image Pre-training with Frozen Image Encoders and Large Language Modelscited by 6,137
- 2024Qwen2.5 Technical Reportcited by 4,942
- 2022Flamingo: a Visual Language Model for Few-Shot Learningcited by 4,386
- 2023Let's Verify Step by Stepcited by 3,789
- 2018HotpotQA: A Dataset for Diverse, Explainable Multi-hop Question Answeringcited by 3,754
- 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,455
- 2017TriviaQA: A Large Scale Distantly Supervised Challenge Dataset for Reading Comprehensioncited by 2,955
- 2018CommonsenseQA: A Question Answering Challenge Targeting Commonsense Knowledgecited by 1,822
35 more
- 2016MS MARCO: A Human Generated MAchine Reading COmprehension Datasetcited by 1,605
- 2018Know What You Don't Know: Unanswerable Questions for SQuADcited by 1,554
- 2017Get To The Point: Summarization with Pointer-Generator Networkscited by 1,292
- 2019PubMedQA: A Dataset for Biomedical Research Question Answeringcited by 1,288
- 2020Constructing A Multi-hop QA Dataset for Comprehensive Evaluation of Reasoning Stepscited by 1,282
- 2021Unsupervised Dense Information Retrieval with Contrastive Learningcited by 1,216
- 2022When Not to Trust Language Models: Investigating Effectiveness of Parametric and Non-Parametric Memoriescited by 1,128
- 2019DROP: A Reading Comprehension Benchmark Requiring Discrete Reasoning Over Paragraphscited by 903
- 2023Large Language Models Can Be Easily Distracted by Irrelevant Contextcited by 841
- 2018CoQA: A Conversational Question Answering Challengecited by 683
- 2021Prompt Programming for Large Language Models: Beyond the Few-Shot Paradigmcited by 606
- 2017The NarrativeQA Reading Comprehension Challengecited by 597
- 2019SAMSum Corpus: A Human-annotated Dialogue Dataset for Abstractive Summarizationcited by 535
- 2018The Web as a Knowledge-base for Answering Complex Questionscited by 410
- 2023Learning to Compress Prompts with Gist Tokenscited by 390
- 2023Adapting Language Models to Compress Contextscited by 356
- 2024HippoRAG: Neurobiologically Inspired Long-Term Memory for Large Language Modelscited by 281
- 2024Unlocking Efficiency in Large Language Model Inference: A Comprehensive Survey of Speculative Decodingcited by 269
- 2023Compressing Context to Enhance Inference Efficiency of Large Language Modelscited by 189
- 2024RedPajama: an Open Dataset for Training Large Language Modelscited by 182
- 2025A Comprehensive Survey on Long Context Language Modelingcited by 117
- 2024HiAgent: Hierarchical Working Memory Management for Solving Long-Horizon Agent Tasks with Large Language Modelcited by 106
- 2024MEMORYLLM: Towards Self-Updatable Large Language Modelscited by 93
- 2023Learning to Filter Context for Retrieval-Augmented Generationcited by 83
- 2024Beyond LLaVA-HD: Diving into High-Resolution Large Multimodal Modelscited by 76
- 2024Learning to Compress Prompt in Natural Language Formatscited by 55
- 2024LongRAG: A Dual-Perspective Retrieval-Augmented Generation Paradigm for Long-Context Question Answeringcited by 49
- 2024Efficient Prompting Methods for Large Language Models: A Surveycited by 47
- 2025Hybrid-Level Instruction Injection for Video Token Compression in Multi-modal Large Language Modelscited by 19
- 2024Extending Llama-3's Context Ten-Fold Overnightcited by 15
- 2025From 128K to 4M: Efficient Training of Ultra-Long Context Large Language Modelscited by 14
- 2024Improve Student's Reasoning Generalizability through Cascading Decomposed CoTs Distillationcited by 9
- 2024Instructing Large Language Models to Identify and Ignore Irrelevant Conditionscited by 7
- 2024Awakening Augmented Generation: Learning to Awaken Internal Knowledge of Large Language Models for Question Answeringcited by 7
- 2024Neural-Symbolic Collaborative Distillation: Advancing Small Language Models for Complex Reasoning Taskscited by 5
Built on by
Citing papers per year: 2025: 2; 2026: 5.
7 papers.
- 2025Memory in the Age of AI Agentscited by 303
- 2026COMI: Coarse-to-fine Context Compression via Marginal Information Gaincited by 13
- 2026Read As Human: Compressing Context via Parallelizable Close Reading and Skimmingcited by 10
- 2026ResAdapt: Adaptive Resolution for Efficient Multimodal Reasoningcited by 8
- 2025SparK: Query-Aware Unstructured Sparsity with Recoverable KV Cache Channel Pruningcited by 6
- 2026Detecting Overflow in Compressed Token Representations for Retrieval-Augmented Generationcited by 1
- 2026Fixed RAG Compression Collapses Measured Reader Scalingcited by 1
- 2026Fixed RAG Compression Collapses Measured Reader Scaling20 Jun 2026
- 2026ResAdapt: Adaptive Resolution for Efficient Multimodal Reasoning30 Mar 2026
- 2026Detecting Overflow in Compressed Token Representations for Retrieval-Augmented Generation12 Feb 2026
- 2026Read As Human: Compressing Context via Parallelizable Close Reading and Skimming2 Feb 2026
- 2026COMI: Coarse-to-fine Context Compression via Marginal Information Gain2 Feb 2026
- 2025Memory in the Age of AI Agents15 Dec 2025
- 2025SparK: Query-Aware Unstructured Sparsity with Recoverable KV Cache Channel Pruning21 Aug 2025
Similar, not cited
Close in wording, no citation either way
- 2025Autoencoding-Free Context Compression for LLMs via Contextual Semantic Anchors
- 2024Enhancing and Accelerating Large Language Models via Instruction-Aware Contextual Compression
- 2025CCF: A Context Compression Framework for Efficient Long-Sequence Language Modeling
- 2025Semantic Retention and Extreme Compression in LLMs: Can We Have Both?
- 2026End-to-End Context Compression at Scale
- 2025Sentence-Anchored Gist Compression for Long-Context LLMs
- 2025ChunkKV: Semantic-Preserving KV Cache Compression for Efficient Long-Context LLM Inference
- 2026From Similarity to Structure: Training-free LLM Context Compression with Hybrid Graph Priors