Latent Reasoning with Normalizing Flows
2026-06-04 • Computation and Language
Computation and LanguageMachine Learning
AI summaryⓘ
The authors explain that large language models usually solve problems step-by-step by writing out their thought process in words, which can be slow and limited. They propose a method called NF-CoT that lets the model think in a more compact and continuous way internally before putting ideas into words. This approach keeps the benefits of step-by-step reasoning while making the process faster and more efficient. They tested NF-CoT on coding tasks and found it worked better and cheaper than previous methods.
large language modelschain-of-thoughtlatent reasoningnormalizing flowsautoregressive modelsKV-cache decodingprobabilistic samplingpolicy-gradient optimizationcode generation benchmarks
Authors
Guancheng Tu, Xiangjun Fu, Suhao Yu, Yao Tang, Haoqiang Kang, Lianhui Qin, Yizhe Zhang, Jiatao Gu
Abstract
Large language models often improve reasoning by generating explicit 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 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, compatibility with KV-cache decoding, and tractable likelihood estimation. We propose NF-CoT, a latent reasoning framework that preserves these advantages by modeling continuous thoughts with normalizing flows. NF-CoT instantiates a 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 direct policy-gradient optimization in the latent reasoning space. On code-generation benchmarks, NF-CoT improves pass rates over explicit-CoT and prior latent-reasoning baselines while substantially reducing intermediate-reasoning cost.