DAC: A Dynamic Attention-aware Approach for Task-Agnostic Prompt Compression
About
Task-agnostic prompt compression leverages the redundancy in natural language to reduce computational overhead and enhance information density within prompts, especially in long-context scenarios. Existing methods predominantly rely on information entropy as the metric to compress lexical units, aiming to achieve minimal information loss. However, these approaches overlook two critical aspects: (i) the importance of attention-critical tokens at the algorithmic level, and (ii) shifts in information entropy during the compression process. Motivated by these challenges, we propose a dynamic attention-aware approach for task-agnostic prompt compression (DAC). This approach effectively integrates entropy and attention information, dynamically sensing entropy shifts during compression to achieve fine-grained prompt compression. Extensive experiments across various domains, including LongBench, GSM8K, and BBH, show that DAC consistently yields robust and substantial improvements across a diverse range of tasks and LLMs, offering compelling evidence of its efficacy.
Related benchmarks
| Task | Dataset | Result | Rank | |
|---|---|---|---|---|
| Mathematical Reasoning | GSM8K | Accuracy74.37 | 1424 | |
| Reasoning | BBH | Accuracy54.31 | 770 | |
| Long-context Understanding | LongBench | Overall Average Score35.42 | 143 | |
| Long-context Multiple Choice Question Answering | InfMC 128K | Accuracy64 | 18 | |
| Long-context Question Answering | NQ 128K | Accuracy12 | 18 | |
| Long-context Question Answering | TriviaQA 128K | Accuracy65 | 18 | |
| Long-context Question Answering | HotpotQA 128K | Accuracy22 | 18 | |
| Long-context Question Answering | NarrQA 128K | Accuracy16 | 18 | |
| Long-context Question Answering | InfQA 128K | Accuracy15 | 18 | |
| Long-context Question Answering | PopQA 128K | Accuracy15 | 18 |