Optimal Control for Transformer Architectures: Enhancing Generalization, Robustness and Efficiency
Kelvin Kan, Xingjian Li, Benjamin J. Zhang, Tuhin Sahai, Stanley Osher, Markos A. Katsoulakis
我们通过最优控制理论的视角研究变形金刚,使用连续时间公式中的工具,对培训和建筑设计产生可操作的见解。 该框架提高了现有变形金刚模型的性能,同时提供了理想的理论保证,包括泛化和稳健性。 我们的框架旨在即插即用,实现与已建立的 Transformer 模型的无缝集成,并且只需要对实现进行轻微的更改。 我们对文本生成、情绪分析、图像分类和点云分类等动机的任务进行了7次广泛的实验。 实验结果表明,该框架提高了基线的测试性能,同时提高了参数效率。 在使用 nanoGPT 的字符级文本生成上,我们的框架实现了 46 42 的最终测试损失,证明了对更大模型的可扩展性。 据我们所知,这是第一个将最优控制理论应用于变形金刚的训练和架构的工作。 它为系统,理论驱动的改进提供了新的基础,并超越了昂贵的试错方法。
We study Transformers through the perspective of optimal control theory, using tools from continuous-time formulations to derive actionable insights into training and architecture design. This framework improves the performance of existing Transformer models while providing desirable theoretical guarantees, including generalization and robustness. Our framework is designed to be plug-and-play, enabling seamless integration with established Transformer models and requiring only slight changes to ...