让多个生成序列协作推理,提升数学题解答准确率
LaneRoPE: Positional Encoding for Collaborative Parallel Reasoning and Generation

- 用跨序列注意力让多条生成路径相互依赖
- 在有限长度下比独立生成提高准确率
- 改动小、开销低,适合现有大模型部署
并行大模型推理技术(如best-of-N)需基于同一输入生成多条序列,虽提升准确率且利用批处理效率,但传统方法中各序列独立生成,无法复用中间结果或观测。本文提出LaneRoPE,实现生成过程中的序列协同。核心思路包括:(a) 跨序列注意力机制,使序列采样相互依赖;(b) 扩展的RoPE位置编码,捕捉序列内与跨序列的相对位置信息。在数学推理任务上评估显示,LaneRoPE能有效促进序列间协作,在生成序列长度受限时带来额外准确率提升。由于仅需微小架构改动且推理开销极低,该方法可快速集成至现有LLM推理流程。
原文摘要 · Abstract (English)
Parallel LLM test-time scaling techniques (e.g., best-of-$N$) require drawing $N>1$ sequences conditioned on the same input prompt. These methods boost accuracy while exploiting the computational efficiency of batching $N$ generations. However, each sequence in the batch is traditionally generated independently and hence does not reuse intermediate generations, computations, or observations from other sequences. In this paper, we propose LaneRoPE to enable coordination and collaboration among $N>1$ sequences at generation time. LaneRoPE involves two key ideas: (a) an inter-sequence attention mask to make sampling of sequences dependent on one another; and (b) a RoPE extension that injects positional information that captures relative positions between tokens, both within and outside a particular sequence. We evaluate our approach on mathematical reasoning tasks and find promising results: LaneRoPE enables collaboration among sequences, yielding additional accuracy gains under limited generated sequence length. Importantly, since LaneRoPE enables coordination with minimal changes to the underlying LLM architecture and introduces a negligible overhead at inference time, it is appealing to rapidly incorporate parallel reasoning into existing LLM inference pipelines.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。