CompLLM: 長文コンテキストQ&Aのための圧縮技術
CompLLM: Compression for Long Context Q&A
September 23, 2025
著者: Gabriele Berton, Jayakrishnan Unnikrishnan, Son Tran, Mubarak Shah
cs.AI
要旨
大規模言語モデル(LLMs)は、自己注意機構の二次的な計算複雑性のため、長い文脈を処理する際に大きな計算上の課題に直面している。入力テキストをより小さな潜在表現にマッピングするソフトな文脈圧縮手法は有望であるものの、実世界での採用は限られている。既存の手法は通常、文脈を単一の単位として圧縮するため、二次的な圧縮複雑性が生じ、重複する文脈を持つクエリ間で計算を再利用することができない。本研究では、実用的な展開を目的としたソフト圧縮手法であるCompLLMを提案する。CompLLMは、文脈を全体的に処理するのではなく、セグメントに分割し、それぞれを独立して圧縮する。このシンプルな設計選択により、効率性(圧縮ステップが文脈長に線形にスケールする)、スケーラビリティ(短いシーケンスで訓練されたモデルが100kトークンの文脈に一般化可能)、再利用性(圧縮されたセグメントをキャッシュし、異なるクエリ間で再利用可能)という3つの重要な特性が得られる。実験結果では、2倍の圧縮率において、長い文脈長ではCompLLMが初回トークンまでの時間(TTFT)を最大4倍高速化し、KVキャッシュサイズを50%削減することが示された。さらに、CompLLMは非圧縮文脈と同等の性能を達成し、非常に長いシーケンスではそれを上回る結果を示し、その有効性と実用性を実証している。
English
Large Language Models (LLMs) face significant computational challenges when
processing long contexts due to the quadratic complexity of self-attention.
While soft context compression methods, which map input text to smaller latent
representations, have shown promise, their real-world adoption is limited.
Existing techniques typically compress the context as a single unit, which
leads to quadratic compression complexity and an inability to reuse
computations across queries with overlapping contexts. In this work, we
introduce CompLLM, a soft compression technique designed for practical
deployment. Instead of processing the context holistically, CompLLM divides it
into segments and compresses each one independently. This simple design choice
yields three critical properties: efficiency, as the compression step scales
linearly with the context length; scalability, enabling models trained on short
sequences (e.g., 1k tokens) to generalize to contexts of 100k tokens; and
reusability, allowing compressed segments to be cached and reused across
different queries. Our experiments show that with a 2x compression rate, at
high context lengths CompLLM speeds up Time To First Token (TTFT) by up to 4x
and reduces the KV cache size by 50%. Furthermore, CompLLM achieves performance
comparable to that obtained with the uncompressed context, and even surpasses
it on very long sequences, demonstrating its effectiveness and practical
utility.