arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2612.02425cs.LGcs.AI
收藏

大型语言模型中潜在推理动力学的表征

Characterizing Latent Reasoning Dynamics in LLMs

Mila – Québec AI Institute(Mila——魁北克人工智能研究所);Université de Montréal(蒙特利尔大学);Capital One(第一资本金融公司);Carnegie Mellon University(卡内基梅隆大学)

Prateek Humane, Supriyo Chakraborty, Atharv Naphade, Sabmit Sahu, Irina Rish

AI总结:

该研究通过KV缓存VAE表征LLM的潜在推理动力学,发现其轨迹模拟误差盆地下降,利用该机制优化token预算可提升推理缩放,且RL后训练会重塑潜在空间。

摘要:

大型语言模型(LLMs)的推理通常通过两种不同机制解释:离散token的自回归生成,以及连续潜在状态的循环优化。两者均通过增加推理时计算提升性能,但基于token的现成模型推理背后的连续计算动力学尚未被直接观测到。我们通过将基于token的推理形式化为KV缓存前缀上的状态转换,并用KV缓存VAE压缩该高维空间,弥合了这一缺口。我们的更广泛目标是表征这些推理动力学,更好地理解驱动它们的底层计算。分析所得状态空间动力学,我们发现标准自回归LLMs隐含执行潜在推理:其轨迹紧密模拟误差盆地上的下降过程。特定token驱动此下降,部分快速利用误差梯度,部分逃离局部最小值进行探索。我们发现轨迹相对稳定,在偏离策略扰动后能快速恢复下降路径。应用这些机制见解,我们通过优化轨迹深度与广度间的token预算权衡,因果改善推理时缩放。具体而言,我们证明初始化多样的潜在“随机种子”(类似普通梯度下降),可引导轨迹朝向不同局部最小值,在正确答案中产生更大多样性。最后,我们发现RL后训练会重塑潜在空间,使其包含更少盆地,同时更快、更可能收敛到与性能提升相关的盆地。

英文摘要:

Reasoning in LLMs is typically explained through two distinct mechanisms: the autoregressive generation of discrete tokens, and the looped refinement of a continuous latent state. Both improve performance by increasing inference-time computation, yet the continuous computational dynamics underlying an off-the-shelf, token-based model's reasoning have not been directly observed. We bridge this gap by formalizing token-based reasoning as state transitions over KV-cache prefixes, compressing this high-dimensional space with a KV-cache VAE. Our broader goal is to characterize these reasoning dynamics and better understand the underlying computations driving them. Analyzing the resulting state-space dynamics, we find that standard autoregressive LLMs implicitly perform latent reasoning: their trajectories closely mimic descent over error basins. Specific tokens drive this descent, some rapidly exploiting the error gradient and others escaping local minima to explore. We find trajectories to be relatively stable, quickly recovering their descent path after off-policy perturbations. Applying these mechanistic insights, we causally improve inference-time scaling by optimizing the token-budget tradeoff between trajectory depth and breadth. Specifically, we demonstrate that initializing diverse latent ``random seeds," much like in vanilla gradient descent, steers trajectories toward distinct local minima and yields a larger diversity in correct answers. Finally, we find that RL post-training reshapes the latent space to contain fewer basins, along with faster and more likely convergence to basins correlated with improved performance.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑