arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2603.09571cs.LGmath.OC
收藏

为变压器训练开发一个最优控制方法

An Optimal Control Approach To Transformer Training

Kağan Akman, Naci Saldi, Serdar Yüksel

AI总结:

本文提出基于最优控制理论的Transformer训练方法,通过三重量化提升MDP,实现全局最优且稳健的训练替代方案。

摘要:

在本文中,我们开发了一种严谨的最优控制理论方法来处理Transformer训练,该方法尊重关键的结构约束,例如(i)执行过程中的实际输入独立性,(ii)问题的集合控制性质,以及(iii)位置依赖性。我们将Transformer架构建模为具有共享动作的离散时间受控粒子系统,表现出无噪声的 McKean-Vlasov 动力学。虽然所产生的动力学不是马尔可夫的,但我们证明将其提升到概率测度会得到一个完全观测的马尔可夫决策过程(MDP)。位置编码被纳入状态空间以在提升过程中保持序列顺序。使用动态规划原理,我们建立了在温和假设下全局最优策略的存在性。我们进一步证明了在提升后的闭环策略等同于一个依赖初始分布的开环策略,这些策略是实际输入独立且与标准Transformer训练兼容的。为了训练Transformer,我们提出了一种三重量化训练程序,对提升的MDP中的状态空间、概率测度空间和动作空间进行量化,并证明任何三重量化模型的最优策略对于原始训练问题都是近优的。最后,我们通过证明价值函数对初始经验测度的扰动连续性以及数据量增加时策略的收敛性,建立了提升模型的稳定性和经验一致性特性。这种方法为不需平滑性或凸性的全局最优和稳健的替代方案提供了梯度法训练。

英文摘要:

In this paper, we develop a rigorous optimal control-theoretic approach to Transformer training that respects key structural constraints such as (i) realized-input-independence during execution, (ii) the ensemble control nature of the problem, and (iii) positional dependence. We model the Transformer architecture as a discrete-time controlled particle system with shared actions, exhibiting noise-free controlled McKean--Vlasov dynamics, and we show that lifting the dynamics to probability measures produces a fully-observed Markov decision process (MDP). Positional encodings are incorporated into the state space to preserve the sequence order under lifting. Using the dynamic programming principle, we establish the existence of globally optimal policies under mild assumptions of compactness. We further prove that closed-loop policies in the lifted problem is equivalent to an initial-distribution dependent open-loop policy, which are realized-input-independent and compatible with standard Transformer training. To train a Transformer, we propose a triply quantized training procedure for the lifted MDP by quantizing the state space, the space of probability measures, and the action space, and show that any optimal policy for the triply quantized model is near-optimal for the original training problem. Finally, we establish stability and empirical consistency properties of the lifted model by showing that the value function is continuous with respect to the perturbations of the initial empirical measures and convergence of policies as the data size increases. This approach provides a globally optimal and robust theoretical alternative to gradient-based training without requiring smoothness or convexity.

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

↑