提出连续思维链模型,实现单次通过的高效推理。
Deep Thinking by Markov Chain of Continuous Thoughts
- 用连续表示替代离散采样,实现思想层面的连续推理
- 在真实数学任务中达成10倍以上速度提升,精度不变
- 适合需要快速高精度推理的应用场景
基于Transformer的模型通过逐标记生成推理路径来完成复杂推理,但通常需生成数千个标记,效率低且计算成本高。更重要的是,每步结尾的离散采样形成信息瓶颈。本文提出MarCos,一种改进的Transformer结构,实现思想层面的完全连续推理。与传统层不同,MarCos层将逐步思想的连续表示映射到下一步思想的分布,从而在单次前向传播中完成多步推理。初步实验在合成和真实数学任务中显示其巨大潜力。值得注意的是,MarCos更高的信息带宽激发了并行思考能力,不同于传统Transformer的串行思考。在真实数学任务中,MarCos在保持相同精度下实现超过10倍的时钟时间加速。代码已公开于https://github.com/Ljyustc/MarCos。
原文摘要 · Abstract (English)
Transformer-based models can perform complicated reasoning by generating reasoning paths token by token. While effective, this approach often requires generating thousands of tokens to solve a single problem, which can be slow and computationally expensive. More importantly, it involves a discrete sampling operation at the end of each time step, creating an information bottleneck across time steps. In this work, we propose MarCos, an improvement of the transformer structure that allows fully continuous reasoning at the thought level. Unlike traditional transformer layers, which focus on refining token predictions at each time step, layers in MarCos map a continuous representation of a stepwise thought to the distribution of the next thought. This enables us to achieve multi-step reasoning in a single pass of MarCos. Preliminary experimental results on synthetic and real-world math tasks show the great potential of MarCos. Notably, we observe that the increased information bandwidth of MarCos elicits the ability of parallel thinking, in contrast to single-threaded thinking in traditional transformers. Meanwhile, in real-world math tasks, MarCos achieves more than $10\times$ speedup in wall-clock time with the same level of accuracy. Our code is available at https://github.com/Ljyustc/MarCos.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。