Table of Contents
Fetching ...

Understanding and Improving Information Preservation in Prompt Compression for LLMs

Weronika Łajewska, Momchil Hardalov, Laura Aina, Neha Anna John, Hang Su, Lluís Màrquez

TL;DR

The paper introduces a holistic framework to evaluate prompt compression for long-context LLMs across three axes: downstream performance, grounding, and information preservation, beyond mere compression rate. It analyzes hard prompting (LLMLingua) and soft prompting (xRAG, PISCO) on diverse long-context tasks, uncovering that many methods fail to preserve crucial details, especially at high compression. Through systematic improvements to xRAG, including sentence-level pre-training and two-step pre-training with sequence-level distillation, the work demonstrates substantial gains in downstream performance, grounding, and information preservation, with PISCO offering the best trade-off overall. The findings advocate for multi-token, task-aware, and hybrid prompting strategies to better preserve information in long-context generation, with practical implications for efficient, faithful retrieval-augmented generation and beyond.

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. Using our framework, we analyze state-of-the-art soft and hard compression methods and show that some fail to preserve key details from the original prompt, limiting performance on complex tasks. By identifying these limitations, we are able to improve one soft prompting method by controlling compression granularity, achieving up to +23% in downstream performance, +8 BERTScore points in grounding, and 2.7x more entities preserved in compression. Ultimately, we find that the best effectiveness/compression rate trade-off is achieved with soft prompting combined with sequence-level training.The code is available at https://github.com/amazon-science/information-preservation-in-prompt-compression.

Understanding and Improving Information Preservation in Prompt Compression for LLMs

TL;DR

The paper introduces a holistic framework to evaluate prompt compression for long-context LLMs across three axes: downstream performance, grounding, and information preservation, beyond mere compression rate. It analyzes hard prompting (LLMLingua) and soft prompting (xRAG, PISCO) on diverse long-context tasks, uncovering that many methods fail to preserve crucial details, especially at high compression. Through systematic improvements to xRAG, including sentence-level pre-training and two-step pre-training with sequence-level distillation, the work demonstrates substantial gains in downstream performance, grounding, and information preservation, with PISCO offering the best trade-off overall. The findings advocate for multi-token, task-aware, and hybrid prompting strategies to better preserve information in long-context generation, with practical implications for efficient, faithful retrieval-augmented generation and beyond.

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. Using our framework, we analyze state-of-the-art soft and hard compression methods and show that some fail to preserve key details from the original prompt, limiting performance on complex tasks. By identifying these limitations, we are able to improve one soft prompting method by controlling compression granularity, achieving up to +23% in downstream performance, +8 BERTScore points in grounding, and 2.7x more entities preserved in compression. Ultimately, we find that the best effectiveness/compression rate trade-off is achieved with soft prompting combined with sequence-level training.The code is available at https://github.com/amazon-science/information-preservation-in-prompt-compression.

Paper Structure

This paper contains 57 sections, 6 figures, 24 tables.

Figures (6)

  • Figure 1: Distribution of the lengths of the examples measured in terms of number of sentences per training sample in pre-training data. The training partition contains 26,541,264 samples overall. The longest sample contains 137 sentences.
  • Figure 2: Information preservation results for xRAG variants. Similarity is measured with BERTScore between the original and reconstructed text. Entity preservation is based on EM of entities in the reconstruction.
  • Figure 3: Histograms of context lengths in the different datasets we use for evaluation.
  • Figure 4: Downstream task performance of different variants of xRAG binned by the length of the input context. Both datasets are evaluated in terms of exact match. Each bucket contains approximately 250 samples.
  • Figure 5: Results of information preservation by different variants of xRAG. Performance is reported in terms of the BERTScore F1 metric computed between the original and reconstructed sample. Results are presented for both in- and out-of-domain samples that are encoded into one token directly or split into sentences and then encoded in multiple tokens.
  • ...and 1 more figures