PIS: Linking Importance Sampling and Attention Mechanisms for Efficient Prompt Compression

要約

大規模な言語モデル(LLM)は驚くべき進歩を達成し、さまざまな自然言語処理タスクにわたって前例のない機能を実証しています。
ただし、このような例外的なパフォーマンスに関連する高コストは、LLMSの広範な採用を制限し、迅速な圧縮の必要性を強調しています。
既存の迅速な圧縮方法は、主にヒューリスティックな切り捨てまたは抽象的な要約技術に依存しています。これは、LLMの本質的なメカニズムを根本的に見落とし、生成のトークンの重要性の体系的な評価を欠いています。
この作業では、隠された状態の注意スコアの分析に基づいて重要なトークンをサンプリングすることにより、プロンプトを動的に圧縮する新しい圧縮フレームワークである、プロンプトの重要性サンプリング(PIS)を導入します。
PISはデュアルレベルの圧縮メカニズムを採用しています。1)トークンレベルでは、LLMネイティブの注意スコアを使用して顕著性を定量化し、軽量9層補強学習(RL)ネットワークを介して適応圧縮を実装します。
2)セマンティックレベルでは、文レベルの重要性サンプリングのためのロシアのルーレットサンプリング戦略を提案します。
複数のドメインベンチマークにわたる包括的な評価は、この方法が最先端の圧縮性能を達成することを示しています。
特に、当社のフレームワークは、最適化されたコンテキスト構造を通じて、偶然に推論効率を高めます。
この作業は、LLMSのコンテキスト管理における理論的根拠と実用的効率の両方を提供することにより、迅速なエンジニアリングを進めます。

要約(オリジナル)

Large language models (LLMs) have achieved remarkable progress, demonstrating unprecedented capabilities across various natural language processing tasks. However, the high costs associated with such exceptional performance limit the widespread adoption of LLMs, highlighting the need for prompt compression. Existing prompt compression methods primarily rely on heuristic truncation or abstractive summarization techniques, which fundamentally overlook the intrinsic mechanisms of LLMs and lack a systematic evaluation of token importance for generation. In this work, we introduce Prompt Importance Sampling (PIS), a novel compression framework that dynamically compresses prompts by sampling important tokens based on the analysis of attention scores of hidden states. PIS employs a dual-level compression mechanism: 1) at the token level, we quantify saliency using LLM-native attention scores and implement adaptive compression through a lightweight 9-layer reinforcement learning (RL) network; 2) at the semantic level, we propose a Russian roulette sampling strategy for sentence-level importance sampling. Comprehensive evaluations across multiple domain benchmarks demonstrate that our method achieves state-of-the-art compression performance. Notably, our framework serendipitously enhances reasoning efficiency through optimized context structuring. This work advances prompt engineering by offering both theoretical grounding and practical efficiency in context management for LLMs.

arxiv情報

著者 Lizhe Chen,Binjia Zhou,Yuyao Ge,Jiayi Chen,Shiguang NI
発行日 2025-04-23 09:53:01+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.AI, cs.CL パーマリンク