RAGOCR: Optical Compression of Retrieval-Augmented Text via Visual Representation
Jiayang Yu, Jialun Zhong, Lei Zou
cs.CL
Submitted: 2026-08-01
Comments: Under reviewing
License: http://creativecommons.org/licenses/by/4.0/
The gist: Retrieval-Augmented Generation (RAG) has become essential for knowledge-intensive question answering, yet scaling RAG pipelines remains challenging due to the prohibitive computational cost of
Terminology
Abstract
Retrieval-Augmented Generation (RAG) has become essential for knowledge-intensive question answering, yet scaling RAG pipelines remains challenging due to the prohibitive computational cost of processing lengthy retrieved contexts. Existing compression approaches face a fundamental trade-off: hard compression methods operate online in a query-aware fashion but achieve only modest compression rates and typically require fine-tuning the generative model, while soft compression methods attain higher ratios but rely on costly offline encoding that is entirely agnostic to the input query. To bridge this gap, we introduce RAGOCR, a novel framework that compresses retrieved documents into compact visual representations conditioned on the input query. To further balance compression rate and information fidelity, we introduce a query-aware dynamic resolution mechanism that adaptively allocates visual granularity based on each document's estimated relevance and complexity: highly relevant passages are rendered at higher resolution to preserve fine-grained details, while peripheral documents are aggressively compressed at lower resolution. Experiments on five QA benchmarks using the MedOmniKB retrieval corpus demonstrate that RAGOCR surpasses naive RAG by over 15% in accuracy while requiring only one-eighth the number of input tokens, and consistently outperforms both hard and soft compression baselines across varying retrieval depths.
Sources
- Qwen-VL: A Versatile Vision-Language Model for Understanding, Localization, Text Reading, and Beyond
- Qwen2.5-VL Technical Report
- Glyph: Scaling Context Windows via Visual-Text Compression
- Provence: efficient and robust context pruning for retrieval-augmented generation
- Context Length Alone Hurts LLM Performance Despite Perfect Retrieval
- RAG-RL: Advancing Retrieval-Augmented Generation via RL and Curriculum Learning
- Search-R1: Training LLMs to Reason and Leverage Search Engines with Reinforcement Learning
- Familiarity-Aware Evidence Compression for Retrieval-Augmented Generation
- Qwen3-VL-Embedding and Qwen3-VL-Reranker: A Unified Framework for State-of-the-Art Multimodal Retrieval and Ranking
- OSCAR: Online Soft Compression And Reranking
- DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models
- Qwen3 Technical Report
- Qwen2-VL: Enhancing Vision-Language Model's Perception of the World at Any Resolution
- RARE: Retrieval-Augmented Reasoning Modeling
- DeepSeek-OCR: Contexts Optical Compression
- DeepSeek-OCR 2: Visual Causal Flow
- Vision-centric Token Compression in Large Language Model
- RECOMP: Improving Retrieval-Augmented LMs with Compression and Selective Augmentation
- Do Less, Achieve More: Do We Need Every-Step Optimization for RL Fine-tuning of Diffusion Models?
- Pixel-Space Diffusion Transformers
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