揭示大模型下一个词预测的轨迹本质与温度影响
Manifold Trajectories in Next-Token Prediction: From Replicator Dynamics to Softmax Equilibrium
- 将采样过程建模为概率单纯形上的变分优化,连续化后对应复制者流
- 固定上下文与温度下,分布收敛至softmax平衡点,路径光滑可追踪
- 解释温度等效于时间缩放,且采样策略可限制在单纯形子面上
大语言模型解码常被描述为对词元打分并用softmax归一化。本文将其视为概率单纯形上的约束变分原理。离散的归一化上升步骤即经典的乘法权重(熵镜像)更新,其连续极限为复制者流。由此证明:在固定上下文与温度下,下一个词分布沿单纯形内光滑轨迹演化并收敛至softmax平衡点,形式化了常见的“流形遍历”直觉。分析揭示精确实践意义:温度等价于沿同一轨迹的时间缩放;top-k与nucleus采样将轨迹限制在单纯形的面内,仍保持相同保证。还简要讨论路径依赖得分调整及其与循环式幻觉行为的联系。本文不涉及训练动态或内部表示,相关工作留待后续研究。
原文摘要 · Abstract (English)
Decoding in large language models is often described as scoring tokens and normalizing with softmax. We give a minimal, self-contained account of this step as a constrained variational principle on the probability simplex. The discrete, normalization-respecting ascent is the classical multiplicative-weights (entropic mirror) update; its continuous-time limit is the replicator flow. From these ingredients we prove that, for a fixed context and temperature, the next-token distribution follows a smooth trajectory inside the simplex and converges to the softmax equilibrium. This formalizes the common ``manifold traversal'' intuition at the output-distribution level. The analysis yields precise, practice-facing consequences: temperature acts as an exact rescaling of time along the same trajectory, while top-k and nucleus sampling restrict the flow to a face with identical guarantees. We also outline a controlled account of path-dependent score adjustments and their connection to loop-like, hallucination-style behavior. We make no claims about training dynamics or internal representations; those are deferred to future work.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。