提出多项式组合激活函数,提升大模型表达能力与训练效率
Polynomial Composition Activations: Unleashing the Dynamics of Large Language Models
- 用多项式组合构造新型激活函数,增强非线性表达力
- 理论证明可达到最优逼近率,用更少参数拟合光滑函数
- 在大语言模型中替换原有激活函数,显著提升准确率与收敛速度
Transformer 因其强大的拟合能力被广泛应用于多个领域,这一成功部分归因于其内在的非线性特性。除了原始架构中的 ReLU,研究者们已探索 GeLU、SwishGLU 等替代模块以增强非线性并提升表征能力。本文提出一类新型多项式组合激活函数(PolyCom),旨在优化 Transformer 的动态表现。理论上,我们对 PolyCom 进行了全面数学分析,揭示其相比其他激活函数具有更强的表达能力与有效性。特别地,我们证明采用 PolyCom 的网络能达到最优逼近率,即在 Sobolev 空间中以最少参数逼近一般光滑函数。我们在大规模语言模型的预训练配置下进行实证实验,涵盖密集与稀疏架构。通过将传统激活函数替换为 PolyCom,模型能够捕捉数据中的高阶交互关系,从而在准确率和收敛速度上均取得显著提升。大量实验结果验证了该方法的有效性。代码已公开于 https://github.com/BryceZhuo/PolyCom。
原文摘要 · Abstract (English)
Transformers have found extensive applications across various domains due to the powerful fitting capabilities. This success can be partially attributed to their inherent nonlinearity. Thus, in addition to the ReLU function employed in the original transformer architecture, researchers have explored alternative modules such as GeLU and SwishGLU to enhance nonlinearity and thereby augment representational capacity. In this paper, we propose a novel category of polynomial composition activations (PolyCom), designed to optimize the dynamics of transformers. Theoretically, we provide a comprehensive mathematical analysis of PolyCom, highlighting its enhanced expressivity and efficacy relative to other activation functions. Notably, we demonstrate that networks incorporating PolyCom achieve the $\textbf{optimal approximation rate}$, indicating that PolyCom networks require minimal parameters to approximate general smooth functions in Sobolev spaces. We conduct empirical experiments on the pre-training configurations of large language models (LLMs), including both dense and sparse architectures. By substituting conventional activation functions with PolyCom, we enable LLMs to capture higher-order interactions within the data, thus improving performance metrics in terms of accuracy and convergence rates. Extensive experimental results demonstrate the effectiveness of our method, showing substantial improvements over other activation functions. Code is available at https://github.com/BryceZhuo/PolyCom.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。