arXiv:2603.28248cs.AI2026-03

用能量函数优化潜变量轨迹,让模型像走迷宫一样逐步推理。

Reasoning as Energy Minimization over Structured Latent Trajectories

  • 把推理过程建模为潜变量轨迹的梯度优化,每步都受能量函数约束。
  • 在逻辑和图任务中能量持续下降,轨迹结构清晰;算术任务则无进展(相关系数0.073)。
  • 适合研究可解释推理、结构化规划与模型偏差分析的读者。

单次解码器不迭代修正答案,而链式思维方法虽有中间步骤但缺乏推理进度的量化指标。本文提出基于能量的结构化潜规划推理(EBRM),将推理视为在学习到的能量函数 $E(h_x, z)$ 下对多步潜变量轨迹 $z_{1:T}$ 进行梯度优化。该能量由每步兼容性、转移一致性与轨迹平滑性组成。训练结合监督编码器-解码器学习与使用硬负样本的对比能量塑造,推理时通过梯度下降或Langevin动力学优化 $z$ 并从 $z_T$ 解码。我们发现关键缺陷:在CNF逻辑满足任务上,潜规划使准确率从约95%降至约56%,源于分布偏移——解码器在编码器输出 $h_x$ 上训练,却在规划器输出 $z_T$(进入未见潜空间)上评估。通过逐步解码、潜变量漂移追踪与梯度分解分析此行为。为此提出双路径解码器训练与潜变量锚定策略。进一步设计六部分消融协议,涵盖组件贡献、轨迹长度、规划动力学、初始化、解码器训练分布与锚定权重。三个合成任务实验表明,能量在图与逻辑任务上单调下降,诱导出结构化潜轨迹,而在算术任务上基本平坦($r = 0.073$),为负面结果。代码已开源。

原文摘要 · Abstract (English)

Single-shot neural decoders commit to answers without iterative refinement, while chain-of-thought methods introduce discrete intermediate steps but lack a scalar measure of reasoning progress. We propose Energy-Based Reasoning via Structured Latent Planning (EBRM), which models reasoning as gradient-based optimization of a multi-step latent trajectory $z_{1:T}$ under a learned energy function $E(h_x, z)$. The energy decomposes into per-step compatibility, transition consistency, and trajectory smoothness terms. Training combines supervised encoder-decoder learning with contrastive energy shaping using hard negatives, while inference performs gradient descent or Langevin dynamics over $z$ and decodes from $z_T$. We identify a critical failure mode: on CNF logic satisfaction, latent planning reduces accuracy from $\approx 95\%$ to $\approx 56\%$. This degradation arises from a distribution mismatch, where the decoder is trained on encoder outputs $h_x$ but evaluated on planner outputs $z_T$ that drift into unseen latent regions. We analyze this behavior through per-step decoding, latent drift tracking, and gradient decomposition. To address it, we propose dual-path decoder training and latent anchoring. We further introduce a six-part ablation protocol covering component contributions, trajectory length, planner dynamics, initialization, decoder training distribution, and anchor weight. Experiments on three synthetic tasks show that energy decreases monotonically and induces structured latent trajectories on graph and logic tasks, while remaining flat on arithmetic ($r = 0.073$), indicating a negative result. Code is available at https://github.com/dkjo8/ebr-via-structured-latent-planning.

推理建模潜变量规划能量模型可解释性

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。