Chain-of-thought (CoT) prompting improves reasoning in large language models (LLMs) by externalizing intermediate computation as discrete text tokens, but this textual interface also introduces redundancy and inference overhead. Latent reasoning offers a promising alternative by carrying part of the computation in continuous representations. However, existing methods typically predefine when latent computation is invoked and how it is allocated during decoding, leaving a key problem unresolved: when to invoke latent computation, what type of computation to perform, and how much budget to allocate. We propose \textbf{Ty}ped \textbf{L}at\textbf{e}nt \textbf{R}easoning (Tyler), a typed and budget-aware framework for latent reasoning during autoregressive decoding. Tyler learns a policy that, at each decoding step, chooses between emitting a text token and switching to a latent computation module specialized for a particular reasoning function. Once invoked, an operator maps the current reasoning state into latent tokens that support global planning, local state updates, or reusable procedural abstraction. Across extensive experiments on three backbone LLMs, Tyler improves accuracy by up to 14.49 points over CoT and by up to 4.30 points over the strongest competing baseline. It further generalizes across diverse reasoning domains and achieves the best final-stage performance with the lowest forgetting.
翻译:链式思维(CoT)提示通过将中间计算外化为离散文本令牌来提升大型语言模型(LLM)的推理能力,但这种文本接口也引入了冗余和推理开销。潜在推理通过在连续表示中承载部分计算提供了一种有前景的替代方案。然而,现有方法通常预定义潜在计算何时被调用以及如何在解码过程中分配,留下了一个关键问题尚未解决:何时调用潜在计算、执行何种类型的计算、以及分配多少预算。我们提出类型化潜在推理(Tyler),一种用于自回归解码过程中潜在推理的类型化且预算感知的框架。Tyler学习一个策略,在每个解码步骤中,在生成文本令牌和切换到专门用于特定推理功能的潜在计算模块之间进行选择。一旦被调用,一个算子将当前推理状态映射到潜在令牌中,这些令牌支持全局规划、局部状态更新或可复用的过程抽象。在三个基础LLM上的广泛实验中,Tyler相比CoT提高了多达14.49个百分点的准确率,相比最强的竞争基线提高了多达4.30个百分点。它进一步跨多种推理领域实现泛化,并以最低的遗忘率达到了最佳最终阶段性能。