Understanding and Improving Information Preservation in Prompt Compression for LLMs
Authors:
- Weronika ŁajewskaWŁWeronika Łajewska
- Momchil HardalovMHMomchil Hardalov
- Laura AinaLALaura Aina
- Neha Anna JohnNJNeha Anna John
- Hang SuHSHang Su
- Lluís MàrquezLMLluís Màrquez
Preprint
Abstract
Recent advancements in large language models (LLMs) have enabled their successful application to a broad range of tasks. However, in information-intensive tasks, the prompt length can grow fast, leading to increased computational requirements, performance degradation, and induced biases from irrelevant or redundant information. Recently, various prompt compression techniques have been introduced to optimize the trade-off between reducing input length and retaining performance. We propose a holistic evaluation framework that allows for in-depth analysis of prompt compression methods. We focus on three key aspects, besides compression ratio: (i) downstream task performance, (ii) grounding in the input context, and (iii) information preservation. Through this framework, we investigate state-of-the-art soft and hard compression methods, showing that they struggle to preserve key details from the original prompt, limiting their performance on complex tasks. We demonstrate that modifying soft prompting methods to control better the granularity of the compressed information can significantly improve their effectiveness -- up to +23\% in downstream task performance, more than +8 BERTScore points in grounding, and 2.7x more entities preserved in compression.Keywords
All Related Versions
This publication has 27 references indexed in Scilit:
- Lost in the Middle: How Language Models Use Long ContextsTransactions of the Association for Computational Linguistics, 2024
- Compressing Context to Enhance Inference Efficiency of Large Language Models2023
- Adapting Language Models to Compress Contexts2023
- LLMLingua: Compressing Prompts for Accelerated Inference of Large Language Models2023
- Did You Read the Instructions? Rethinking the Effectiveness of Task Definitions in Instruction Learning2023
- Prompt Compression and Contrastive Conditioning for Controllability and Toxicity Reduction in Language Models2022
- The Power of Scale for Parameter-Efficient Prompt Tuning2021
- Datasets: A Community Library for Natural Language Processing2021
- How Can We Know What Language Models Know?Transactions of the Association for Computational Linguistics, 2020
- Transformers: State-of-the-Art Natural Language Processing2020