arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2407.15504cs.LGcs.CLcs.ITmath.IT
收藏

提示压缩的基本极限:面向黑盒语言模型的率失真框架

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

UT Austin(德克萨斯大学奥斯汀分校);EPFL(洛桑联邦理工学院)

Alliot Nagle, Adway Girish, Marco Bondaschi, Michael Gastpar, Ashok Vardhan Makkuva, Hyeji Kim

AI总结:

该研究形式化大语言模型提示压缩问题,提出率失真框架推导其基本极限,发现现有方法与最优策略存在差距,并提出感知查询的Adaptive QuerySelect方法缩小差距,经合成与自然语言数据集验证结论。

摘要:

我们对大语言模型(LLM)的提示压缩问题进行了形式化定义,并提出一个框架,统一为黑盒模型生成硬提示的词元级提示压缩方法。我们将该设置下的失真率函数推导为一个线性规划问题,并提供一种高效算法,通过该线性规划的对偶问题计算这一基本极限。我们以失真率函数为基准,在一个合成数据集(包含由马尔可夫链生成的提示、自然语言查询及其对应答案)上研究了现有压缩方案的性能。实证分析表明,感知查询的提示压缩至关重要,即压缩器掌握黑盒LLM的下游任务/查询相关信息。我们发现当前提示压缩方法的性能与最优策略之间存在较大差距,并提出Adaptive QuerySelect——一种基于先前工作的感知查询、可变速率的改进方法,以缩小这一差距。我们还将实验扩展到一个小型自然语言数据集,进一步验证了在合成数据集上得到的结论。

英文摘要:

We formalize the problem of prompt compression for large language models (LLMs) and present a framework to unify token-level prompt compression methods which create hard prompts for black-box models. We derive the distortion-rate function for this setup as a linear program, and provide an efficient algorithm to compute this fundamental limit via the dual of the linear program. Using the distortion-rate function as the baseline, we study the performance of existing compression schemes 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 query-aware prompt compression, where the compressor has knowledge of the downstream task/query for the black-box LLM. We show that there is a large gap between the performance of current prompt compression methods and the optimal strategy, and propose Adaptive QuerySelect, a query-aware, variable-rate adaptation of a prior work to close the gap. We extend our experiments to a small natural language dataset to further confirm our findings on our synthetic dataset.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑