基于归一化流的潜在推理

Hugging Face Daily Papers 论文

摘要

提出NF-CoT,一种使用归一化流来建模LLMs中连续思维的潜在推理框架,保留了自回归优势,并以更低的成本实现了更好的代码生成性能。

大型语言模型通常通过生成显式的思维链(CoT)来改进推理,这突显了中间计算的重要性。然而,文本形式的CoT强制这种计算通过离散、串行且面向通信的令牌流进行:每一步推理都必须先被语言化,模型才能继续,即使底层更新是语义性的、不确定的或仅部分形成的。潜在推理提供了一种更高带宽的替代方案,通过在紧凑的连续状态中进行中间计算,然后再提交为文本。然而,现有的潜在推理方法常常牺牲了使CoT在自回归语言模型中有效的关键优势,包括原生的从左到右生成、概率采样、与KV缓存解码的兼容性以及可处理的似然估计。我们提出NF-CoT,一种通过使用归一化流建模连续思维来保留这些优势的潜在推理框架。NF-CoT在LLM骨干网络内部实例化了一种TARFlow风格的归一化流,为从显式CoT中提炼出的紧凑连续思维定义了可处理的概率模型。连续思维位置由NF头部生成,而文本位置由同一因果流中的标准LM头部生成。这种设计为潜在思维提供了精确的似然值,使原始KV缓存能够进行概率性的从左到右解码,并支持在潜在推理空间中进行直接策略梯度优化。在代码生成基准测试中,NF-CoT相比显式CoT和之前的潜在推理基线提高了通过率,同时大幅降低了中间推理成本。
查看原文
查看缓存全文

缓存时间: 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

相似文章

ReasoningFlow: 用于理解LLM推理轨迹的篇章结构

arXiv cs.CL

介绍 ReasoningFlow,一个将大语言模型推理轨迹的篇章结构捕获为有向无环图的框架,从而能够细粒度分析推理行为(如自我反思和回溯)。基于对数千条轨迹的手动和自动标注,揭示了模型之间的结构相似性,并且大多数错误步骤并不贡献于最终答案。

自适应潜在智能体推理

arXiv cs.CL

本文介绍了自适应潜在智能体推理(ALAR),一种针对LLM智能体的双模式框架,它使用紧凑的潜在推理处理常规轮次,并选择性地升级为显式思维链以应对更困难的决策,实现了高达84.6%的令牌减少,同时保持任务准确性。

NoisyCoconut:通过潜在空间推理实现反事实共识

arXiv cs.LG

本文介绍了 NoisyCoconut,这是一种在推理阶段通过向潜在轨迹注入噪声以生成多样化推理路径从而提高大语言模型可靠性的方法。该方法使模型能够在不确定时选择拒答,从而在无需重新训练的情况下显著降低数学推理任务的错误率。