EnComp: Lightweight Encoder-Only Context Compression for Retrieval-Augmented Question Answering
cs.CL
Submitted: 2026-03-10
Updated: 2026-09-23
Comments: Accepted at AACL 2026 (Main)
Code: https://github.com/thaodod/LooComp
License: http://creativecommons.org/licenses/by/4.0/
The gist: Efficient context compression is critical for retrieval-augmented question answering in resource-constrained settings, where long retrieved contexts increase latency, memory use, and LLM reader cost.
Terminology
Abstract
Efficient context compression is critical for retrieval-augmented question answering in resource-constrained settings, where long retrieved contexts increase latency, memory use, and LLM reader cost. We propose a lightweight encoder-only framework for query-driven sentence pruning that preserves answer-critical evidence while aggressively reducing irrelevant context. Our method learns marginal contribution scores for sentences using counterfactual training signals and optimizes a contrastive ranking objective that separates critical evidence from noncritical context. Our approach scores all sentences from a single full-context encoding, enabling fast inference with low computational overhead. Experiments show that it maintains accuracy comparable to the strongest baseline while using 3.7 times less peak memory and achieving nearly 3 times lower compression latency, demonstrating an effective quality--efficiency trade-off for practical resource-constrained deployment.
Sources
- Provence: efficient and robust context pruning for retrieval-augmented generation
- Gemini 2.5: Pushing the Frontier with Advanced Reasoning, Multimodality, Long Context, and Next Generation Agentic Capabilities
- Retrieval-Augmented Generation for Large Language Models: A Survey
- In-context Autoencoder for Context Compression in a Large Language Model
- Constructing A Multi-hop QA Dataset for Comprehensive Evaluation of Reasoning Steps
- EXIT: Context-Aware Extractive Compression for Enhancing Retrieval-Augmented Generation
- Unsupervised Dense Information Retrieval with Contrastive Learning
- LongLLMLingua: Accelerating and Enhancing LLMs in Long Context Scenarios via Prompt Compression
- TriviaQA: A Large Scale Distantly Supervised Challenge Dataset for Reading Comprehension
- Demonstrate-Search-Predict: Composing retrieval and language models for knowledge-intensive NLP
- Compressing Context to Enhance Inference Efficiency of Large Language Models
- Refiner: Restructure Retrieval Content Efficiently to Advance Question-Answering Capabilities
- Task-agnostic Prompt Compression with Context-aware Sentence Embedding and Reward-guided Task Descriptor
- Lost in the Middle: How Language Models Use Long Contexts
- Kimi K2: Open Agentic Intelligence
- Interleaving Retrieval with Chain-of-Thought Reasoning for Knowledge-Intensive Multi-Step Questions
- Smarter, Better, Faster, Longer: A Modern Bidirectional Encoder for Fast, Memory Efficient, and Long Context Finetuning and Inference
- Prompt Compression and Contrastive Conditioning for Controllability and Toxicity Reduction in Language Models
- Encoder vs Decoder: Comparative Analysis of Encoder and Decoder Language Models on Multilingual NLU Tasks
- LLMLingua-2: Data Distillation for Efficient and Faithful Task-Agnostic Prompt Compression
Related papers
- Exploring Solution Divergence and Its Effect on Large Language Model Problem Solving
- Ishigaki-IDS-Bench: A Benchmark for Generating Information Delivery Specification from BIM Information Requirements
- Subliminal Steering: Stronger Encoding of Hidden Signals
- MedStruct-S: A Benchmark for Key Discovery, Key-Conditioned QA and Semi-Structured Extraction from OCR Clinical Reports
- The End of Transformers? On Challenging Attention and the Rise of Sub-Quadratic Architectures
- Untangling the Mechanisms of Misleading Context in Medical Question Answering