基于归一化流的潜在推理
摘要
提出NF-CoT,一种使用归一化流来建模LLMs中连续思维的潜在推理框架,保留了自回归优势,并以更低的成本实现了更好的代码生成性能。
查看缓存全文
缓存时间: 2026/06/05 06:07
论文页面 - Latent Reasoning with Normalizing Flows
Source: https://huggingface.co/papers/2606.06447
摘要
Large language models often improve reasoning by generating explicit chain-of-thought (https://huggingface.co/papers?q=chain-of-thought)(CoT), demonstrating the importance of intermediate computation. However, textual CoT forces this computation through a discrete, serial, and communication-oriented token stream: each reasoning step must be verbalized before the model can proceed, even when the underlying update is semantic, uncertain, or only partially formed.Latent reasoning (https://huggingface.co/papers?q=Latent%20reasoning)offers a higher-bandwidth alternative by performing intermediate computation in compact continuous states before committing to text. Yet existing latent-reasoning methods often sacrifice key advantages that make CoT effective in autoregressive language models, including native left-to-right generation,probabilistic sampling (https://huggingface.co/papers?q=probabilistic%20sampling), compatibility withKV-cache decoding (https://huggingface.co/papers?q=KV-cache%20decoding), and tractablelikelihood estimation (https://huggingface.co/papers?q=likelihood%20estimation). We propose NF-CoT, alatent reasoning (https://huggingface.co/papers?q=latent%20reasoning)framework that preserves these advantages by modeling continuous thoughts withnormalizing flows (https://huggingface.co/papers?q=normalizing%20flows). NF-CoT instantiates aTARFlow (https://huggingface.co/papers?q=TARFlow)-style normalizing flow inside the LLM backbone, defining a tractable probability model over compact continuous thoughts distilled from explicit CoT. Continuous-thought positions are generated by an NF head, while text positions are generated by the standard LM head within the same causal stream. This design provides exact likelihoods for latent thoughts, enables probabilistic left-to-right decoding with the original KV cache, and supports directpolicy-gradient optimization (https://huggingface.co/papers?q=policy-gradient%20optimization)in thelatent reasoning (https://huggingface.co/papers?q=latent%20reasoning)space. Oncode-generation benchmarks (https://huggingface.co/papers?q=code-generation%20benchmarks), NF-CoT improves pass rates over explicit-CoT and prior latent-reasoning baselines while substantially reducing intermediate-reasoning cost.
大型语言模型通常通过生成显式的链式思维(https://huggingface.co/papers?q=chain-of-thought)(CoT)来改进推理,这证明了中间计算的重要性。然而,文本形式的CoT强制将这种计算通过离散、串行且面向通信的令牌流进行:每个推理步骤必须先用语言表达出来,模型才能继续,即便底层更新是语义化、不确定或仅部分形成的。潜在推理(https://huggingface.co/papers?q=Latent%20reasoning)提供了一种更高带宽的替代方案,在提交文本之前,在紧凑的连续状态中执行中间计算。然而,现有的潜在推理方法常常牺牲了使CoT在自回归语言模型中有效的一些关键优势,包括原生从左到右生成、概率采样(https://huggingface.co/papers?q=probabilistic%20sampling)、与KV缓存解码(https://huggingface.co/papers?q=KV-cache%20decoding)的兼容性,以及可处理的似然估计(https://huggingface.co/papers?q=likelihood%20estimation)。我们提出NF-CoT,一个潜在推理(https://huggingface.co/papers?q=latent%20reasoning)框架,通过用归一化流(https://huggingface.co/papers?q=normalizing%20flows)对连续思维进行建模,保留了这些优势。NF-CoT在LLM骨干网内部实例化了一个TARFlow(https://huggingface.co/papers?q=TARFlow)风格的归一化流,定义了一个可处理的概率模型,用于从显式CoT中提炼出的紧凑连续思维。连续思维位置由NF头生成,而文本位置由同一因果流内的标准LM头生成。这种设计为潜在思维提供了精确的似然,支持使用原始KV缓存进行概率性的从左到右解码,并在潜在推理(https://huggingface.co/papers?q=latent%20reasoning)空间中支持直接的策略梯度优化(https://huggingface.co/papers?q=policy-gradient%20optimization)。在代码生成基准(https://huggingface.co/papers?q=code-generation%20benchmarks)上,NF-CoT相比显式CoT和先前的潜在推理基线提高了通过率,同时大幅降低了中间推理成本。
查看 arXiv 页面 (https://arxiv.org/abs/2606.06447)查看 PDF (https://arxiv.org/pdf/2606.06447)项目页面 (https://nf-cot.vercel.app/)添加到收藏 (https://huggingface.co/login?next=%2Fpapers%2F2606.06447)
在您的代理中获取这篇论文:
hf papers read 2606\.06447
没有最新的CLI?curl \-LsSf https://hf\.co/cli/install\.sh \| bash
引用本文的模型0
没有链接此论文的模型
在模型 README.md 中引用 arxiv.org/abs/2606.06447,即可从此页面链接。
引用本文的数据集0
没有链接此论文的数据集
在数据集 README.md 中引用 arxiv.org/abs/2606.06447,即可从此页面链接。
引用本文的 Spaces0
没有链接此论文的 Space
在 Space README.md 中引用 arxiv.org/abs/2606.06447,即可从此页面链接。
包含此论文的收藏1
相似文章
将潜在思维链推理解释为动力系统
本文应用动力系统分析来解释CODI和COCONUT等模型中的潜在思维链推理,揭示了具有稳定和不稳定类别的结构化动态。
A*-Thought-V2:通过LLM几何动力学实现高效潜在推理
A*-Thought-V2将思维链推理建模为隐藏状态轨迹,利用几何动力学将非必要步骤压缩为潜在令牌,从而提升LLM推理的准确性和效率。
GradCuit: 信用分配的梯度流实现稳健且可解释的测试时潜在推理
本文介绍了GradCuit,一种测试时潜在推理方法,在选定的Transformer层插入可优化的潜在状态。它在五个骨干模型和三个推理基准上实现了64.5%的平均准确率,优于思维链提示,并展现出更好的稳健性和可解释性。
为什么将残差流限制在层而非令牌?用于连续潜在推理的持久记忆
本文识别了CoCoNuT潜在推理范式中的'概念瓶颈',即隐藏状态在多次传递中被覆盖,并提出了AGCLR,该方法添加了门控持久记忆流以保留中间事实。在GSM8K、HotpotQA和ProsQA上使用GPT-2进行评估,结果显示一致性改进,尤其是在多跳任务上。
@burny_tech: 隐式推理综述 "大型语言模型(LLMs)展现了令人印象深刻的推理能力,尤其是……
本综述全面概述了LLM中的隐式推理,探讨了在连续隐藏状态中执行多步推理且无需显式token级监督的方法。