arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2505.13499cs.LGcs.AImath.OC
收藏

Transformer架构的最优控制:增强泛化、鲁棒性与效率

Optimal Control for Transformer Architectures: Enhancing Generalization, Robustness and Efficiency

Department of Mathematics UCLA(数学系,加州大学洛杉矶分校);Oden Institute University of Texas at Austin(奥登研究所,德克萨斯大学奥斯汀分校);School of Data Science and Society UNC Chapel Hill(数据科学与社会学院,北卡罗来纳大学夏洛特分校);SRI International(SRI国际);Department of Mathematics and Statistics University of Massachusetts Amherst(数学与统计系,马萨诸塞大学阿姆赫斯特分校)

Kelvin Kan, Xingjian Li, Benjamin J. Zhang, Tuhin Sahai, Stanley Osher, Markos A. Katsoulakis

AI总结:

本文提出基于最优控制理论的Transformer训练与架构设计框架,在提升泛化、鲁棒性和参数效率的同时,显著降低测试损失,为首个将最优控制理论应用于Transformer的工作。

摘要:

我们通过最优控制理论的视角研究Transformer,利用连续时间公式的工具来获得关于训练和架构设计的可行见解。该框架在提升现有Transformer模型性能的同时,提供了令人满意的理论保证,包括泛化性和鲁棒性。我们的框架设计为即插即用,能够与已建立的Transformer模型无缝集成,且仅需对实现进行轻微改动。我们针对文本生成、情感分析、图像分类和点云分类等任务开展了七项大规模实验。实验结果表明,该框架在提升基线模型测试性能的同时,更具参数效率。在基于nanoGPT的字符级文本生成任务中,我们的框架在减少42%参数的情况下,最终测试损失降低了46%。在GPT-2上,我们的框架实现了最终测试损失9.3%的降低,展示了其向更大模型扩展的能力。据我们所知,这是首个将最优控制理论同时应用于Transformer训练和架构的工作。它为系统性、理论驱动的改进提供了新基础,并超越了昂贵的试错方法。

英文摘要:

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 the implementation. We conduct seven extensive experiments on tasks motivated by text generation, sentiment analysis, image classification, and point cloud classification. Experimental results show that the framework improves the test performance of the baselines, while being more parameter-efficient. On character-level text generation with nanoGPT, our framework achieves a 46% reduction in final test loss while using 42% fewer parameters. On GPT-2, our framework achieves a 9.3% reduction in final test loss, demonstrating scalability to larger models. To the best of our knowledge, this is the first work that applies optimal control theory to both the training and architecture of Transformers. It offers a new foundation for systematic, theory-driven improvements and moves beyond costly trial-and-error approaches.

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

↑