Read As Human: Compressing Context via Parallelizable Close Reading and Skimming
Jiwei Tang, Shilei Liu, Zhicheng Zhang, Qingsong Lv, Runsong Zhao, Tingwei Lu, Langming Liu, Haibin Chen, Yujin Yuan, Hai-Tao Zheng, Wenbo Su, Bo Zheng
TL;DR
This work tackles the bottleneck of long-context processing in LLMs by introducing RAM, Read As HuMan, a context compression framework that reads highly relevant segments in full while skimming the rest through query-guided compression. RAM encodes all segments and the query in parallel, builds a hybrid representation by concatenating verbatim text with compact skim vectors, and uses a contrastive objective to sharpen the boundary between close reading and skimming. It achieves state-of-the-art or competitive results on multiple QA and summarization benchmarks with up to ≈12x end-to-end speedups on long inputs, and demonstrates robustness across backbones and compression rates. The approach offers substantial efficiency gains without sacrificing interpretability, enabling practical deployment of LLMs in long-context settings.
Abstract
Large Language Models (LLMs) demonstrate exceptional capability across diverse tasks. However, their deployment in long-context scenarios is hindered by two challenges: computational inefficiency and redundant information. We propose RAM (Read As HuMan), a context compression framework that adopts an adaptive hybrid reading strategy, to address these challenges. Inspired by human reading behavior (i.e., close reading important content while skimming less relevant content), RAM partitions the context into segments and encodes them with the input query in parallel. High-relevance segments are fully retained (close reading), while low-relevance ones are query-guided compressed into compact summary vectors (skimming). Both explicit textual segments and implicit summary vectors are concatenated and fed into decoder to achieve both superior performance and natural language format interpretability. To refine the decision boundary between close reading and skimming, we further introduce a contrastive learning objective based on positive and negative query-segment pairs. Experiments demonstrate that RAM outperforms existing baselines on multiple question answering and summarization benchmarks across two backbones, while delivering up to a 12x end-to-end speedup on long inputs (average length 16K; maximum length 32K).
