DAC: A Dynamic Attention-aware Approach for Task-Agnostic Prompt Compression
Preprint
Abstract
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.Keywords
All Related Versions
This publication has 16 references indexed in Scilit:
- Igniting Language Intelligence: The Hitchhiker’s Guide from Chain-of-Thought Reasoning to Language AgentsACM Computing Surveys, 2025
- The rise and potential of large language model based agents: a surveyScience China Information Sciences, 2025
- Discrete Prompt Compression With Reinforcement LearningIEEE Access, 2024
- Fewer is More: Boosting Math Reasoning with Reinforced Context Pruning2024
- LongBench: A Bilingual, Multitask Benchmark for Long Context Understanding2024
- LongLLMLingua: Accelerating and Enhancing LLMs in Long Context Scenarios via Prompt Compression2024
- Compressing Context to Enhance Inference Efficiency of Large Language Models2023
- LLMLingua: Compressing Prompts for Accelerated Inference of Large Language Models2023
- Challenging BIG-Bench Tasks and Whether Chain-of-Thought Can Solve Them2023
- Prompt Compression and Contrastive Conditioning for Controllability and Toxicity Reduction in Language Models2022