arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2604.23740cs.LG
收藏

Transformer作为基于分数的变分流的欧拉离散化

Transformer as an Euler Discretization of Score-based Variational Flow

naturomics

Huadong Liao

AI总结:

本文提出基于分数的变分流(SVFlow),通过变分后验加权平均条件对数似然分数来构建连续时间动态系统,证明Transformer架构可通过球形SVFlow的前向欧拉离散化得到,并展示其在语言模型中的应用效果。

摘要:

尽管Transformer在机器学习中占据主导地位,但其架构仍 largely heuristic 且缺乏统一的理论基础。我们引入基于分数的变分流(SVFlow),一种用于表示学习的连续时间动态系统,在其中状态根据条件对数似然分数的变分后验加权平均来演变,并通过变分一致性提供正则化的原理基础。我们证明球形SVFlow的前向欧拉离散化精确恢复Transformer架构。多头注意力通过vMF核平滑后验近似SVFlow向量场,而MoE/FFN则以放松的网络方式近似,残差归一化块实现放松的重新traction以维持球面几何。这种统一解释了为什么注意力训练无需显式正则化而MoE需要辅助平衡损失。在预训练语言模型上的实验表明,SVFlow诱导的度量与任务性能相关,揭示了深度依赖的敏感性,并反映了注意力的内在动态。

英文摘要:

Despite the Transformer's dominance across machine learning, its architecture remains largely heuristic and lacks a unified theoretical foundation. We introduce Score-based Variational Flow (SVFlow), a continuous-time dynamical system for representation learning in which the state evolves according to a variational posterior-weighted average of conditional log-likelihood scores, and provide a principled basis for regularization through variational consistency. We show that forward Euler discretization of spherical SVFlow exactly recovers the Transformer architecture. Multi-head attention approximates SVFlow vector field via a vMF kernel-smoothed posterior, while MoE/FFN approximates it in a relaxed network-based way, and the residual-normalization block implements a relaxed retraction that maintains spherical geometry. This unification explains why attention trains stably without explicit regularization while MoE requires auxiliary balancing losses. Experiments on pre-trained language models with prefix shuffling show that SVFlow-induced metrics correlate with task performance, reveal depth-dependent sensitivity, and reflect the intrinsic dynamics of attention.

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

↑