cs.CLNov 10, 2026

OpticalRAG: Pixel-Space Compression for Token-Efficient Retrieval-Augmented Generation

Authors: Senhao Liu, Yuheng Zhang, Chunyu Wei, Yueguo Chen, Xinran Zhang

Organizations: School of Information, Renmin University of China, Beijing, China · ComindX · Claremont McKenna College, Claremont, CA, USA

Abstract

Retrieval-augmented generation (RAG) is bottlenecked by the token budget of large language models: feeding long documents into the context window is expensive, while aggressive textual compression discards fine-grained information that is irreversibly lost in a one-dimensional token sequence. We argue that this bottleneck is not fundamental to information density but to the choice of compression modality. Modern visual encoders can pack the contents of a rendered text page into roughly a hundred visual tokens with little semantic loss, opening a new compression-fidelity tradeoff that purely textual methods cannot reach. We present OpticalRAG, a framework that renders documents as page images, encodes them with a frozen vision encoder, and distills the retrieved visual tokens into as few as 1616 injected tokens before passing them to the LLM. Two ingredients make this work without expensive cross-modal training: (i) Encoder-Bridged Retrieval, which projects text-query states into the visual feature space of the frozen encoder, through a projection shared with the compressor, to retrieve visual tokens from a text query, with no contrastive training; and (ii) Query-Driven Distillation, a lightweight cross-attention compressor that condenses the retrieved visual tokens into a small set of query-conditioned prefix tokens. On LongBench-v2, BAMBOO, and LooGLE-v2, OpticalRAG achieves the best compression-aware accuracy (CAP) on all three benchmarks while injecting only 1616 tokens, and improves the closed-book Qwen2.5-7B-Instruct backbone by 5.175.17 points on LongBench-v2. Code is available at https://github.com/brighterr/OpticalRAG.

Figures & tables

Appendix figures & tables13 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. RAGOCR: Optical Compression of Retrieval-Augmented Text via Visual Representation

    Aug 1, 2026Jiayang Yu, Jialun Zhong, Lei ZouMultimodal RAGRetrieval-Augmented Generation

  2. AgenticOCR: Parsing Only What You Need for Efficient Retrieval-Augmented Generation

    Feb 27, 2026Zhengren Wang, Dongsheng Ma, Huaping Zhong +4Multimodal RAGVisual Document Retrieval

  3. REVA: Reusable Evidence View Aggregation for Context-Efficient RAG Serving

    Sep 10, 2026Tuan Nguyen, Qiran Hu, Banruo Liu +3LLM Inference EfficiencyRetrieval-Augmented Generation