通过激活聚合进行提示压缩
Prompt Compression via Activation Aggregation
AI总结:
研究探讨能否将指令提示的任务相关信息压缩成单个激活向量注入模型,利用中间层激活的学习加权和实现了这一点,压缩向量保留关键信息且准确率下降小,还揭示了语言模型激活空间的结构。
摘要:
大型语言模型在生成响应前,通过数十层传播激活来处理提示。我们探讨指令提示中与任务相关的信息能否被压缩成单个激活向量并重新注入模型,以取代原始令牌序列?我们表明,利用在中间层提取并在目标语言模型早期层注入的激活的学习加权和可以实现这一点。压缩向量保留了与任务相关的信息,相对于完整提示处理,准确率下降不到2%。除了实际意义,包括减少固定指令提示的每次查询计算而无需重新处理原始令牌序列外,我们的分析还揭示了语言模型激活空间中的结构:(i)中间层表示有意义地转移到早期层,表明信息编码方式存在一定程度的跨层兼容性;(ii)单个激活向量编码了可量化和可恢复的语义信息量;(iii)激活的加权和是一种强大的表示压缩器。
英文摘要:
Large language models process prompts by propagating activations through dozens of layers before generating a response. We ask whether the task-relevant information contained in an instruction prompt can be compressed into a single activation vector and re-injected into the model, replacing the original token sequence? We show this is achievable using a learned weighted sum of activations extracted at an intermediate layer and injected at an early layer of the target LLM. The compressed vector preserves task-relevant information, incurring an accuracy drop of under $2\%$ relative to full prompt processing. Beyond its practical implications, including reducing per-query computation for fixed instruction prompts without reprocessing the original token sequence, our analysis reveals structure in the activation space of LLMs: (i) mid-layer representations transfer meaningfully to early layers, suggesting a degree of cross-layer compatibility in how information is encoded; (ii) a single activation vector encodes a quantifiable and recoverable amount of semantic information; (iii) a weighted sum of activations is a robust representation compressor.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。