用分块压缩与搜索,让长推理更省资源且不失准确
R1-Compress: Long Chain-of-Thought Compression via Chunk Compression and Search
- 分块压缩+跨块搜索,保留局部逻辑和整体连贯性
- 数学题上压缩20%令牌,准确率仅降0.6%至92.4%
- 适合追求高效推理的模型部署与长链条任务
链式思维(CoT)通过逐步推理提升大语言模型表现,但长链推理因文本过长带来巨大计算开销。现有压缩方法——实例级与标记级——或丢失关键反思信息,或导致输出不连贯。为此,我们提出R1-Compress,一种两阶段分块级压缩框架,同时保留局部信息与整体连贯性。该方法将长链推理切分为可管理块,利用大模型驱动的块内压缩,并通过块间搜索机制选出短而连贯的序列。在Qwen2.5-Instruct模型上,针对MATH500、AIME24和GPQA-Diamond数据集的实验表明,R1-Compress显著降低令牌使用量,同时保持接近基线的推理准确率。在MATH500上,准确率达92.4%,相比长链基线仅下降0.6%,令牌消耗减少约20%。源代码将公开于https://github.com/w-yibo/R1-Compress。
原文摘要 · Abstract (English)
Chain-of-Thought (CoT) reasoning enhances large language models (LLMs) by enabling step-by-step problem-solving, yet its extension to Long-CoT introduces substantial computational overhead due to increased token length. Existing compression approaches -- instance-level and token-level -- either sacrifice essential local reasoning signals like reflection or yield incoherent outputs. To address these limitations, we propose R1-Compress, a two-stage chunk-level compression framework that preserves both local information and coherence. Our method segments Long-CoT into manageable chunks, applies LLM-driven inner-chunk compression, and employs an inter-chunk search mechanism to select the short and coherent sequence. Experiments on Qwen2.5-Instruct models across MATH500, AIME24, and GPQA-Diamond demonstrate that R1-Compress significantly reduces token usage while maintaining comparable reasoning accuracy. On MATH500, R1-Compress achieves an accuracy of 92.4%, with only a 0.6% drop compared to the Long-CoT baseline, while reducing token usage by about 20%. Source code will be available at https://github.com/w-yibo/R1-Compress
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。