Fundamental Limits of Prompt Compression: A Rate-Distortion Framework for Black-Box Language Models

Published: 18 Jun 2024, Last Modified: 22 Jul 2024TF2M 2024 OralEveryoneRevisionsBibTeXCC BY 4.0
Keywords: information theory, prompt compression, LLMs, optimization
TL;DR: We formalize and study fundamental limits of prompt compression for large language models via a rate-distortion framework.
Abstract: We formalize the problem of token-level hard prompt compression for black-box large language models (LLMs). We derive the distortion-rate function for this setup as a linear program, and provide an efficient algorithm to compute this fundamental limit via its dual. We compare the performance of existing compression schemes with this fundamental limit on a synthetic dataset consisting of prompts generated from a Markov chain, natural language queries, and their respective answers. Our empirical analysis demonstrates the criticality of the compressor being aware of the downstream task/query for the black-box. We observe a large gap between the performance of current prompt compression methods and the optimal strategy, and propose a query-aware, variable-rate adaptation of a prior work to close the gap.
Submission Number: 49
Loading