Reproduce “BEAVER: A Training-Free Hierarchical Prompt Compression Method via Structure-Aware Page Selection” on OpenResearch

Turn your favorite coding agents into research agents that review literature, develop hypotheses, and run experiments.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Zhengpei Hu, Kai Li, Dapeng Fu, Chang Zeng, Yue Li, Yuanhao Tang, Jianqiang Huang

BEAVER introduces a training-free hierarchical prompt compression method that leverages structure-aware page selection to efficiently process ultra-long contexts for Large Language Models. The approach delivers substantial speedups, achieving 26.4x faster compression on 128k token contexts compared to baselines, while maintaining high performance, notably achieving an 83.7 average score on the RULER benchmark and outperforming other methods on L-Eval.

Key insights

  • Hierarchical prompt compression at the segment-page level, coupled with sentence smoothing, effectively maintains discourse integrity and avoids semantic fragmentation caused by token-level pruning.
  • A dual-path PageEncoder that fuses global semantic representations (weighted average) with salient local features (max pooling) significantly improves the robustness of page-level information encoding.
  • A hybrid scoring mechanism combining semantic relevance and lexical overlap, integrated with structural priors like 'Anchors,' 'Flow,' and 'Flash' pages, is essential for comprehensive and accurate context selection.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.