用新型网络替代MLP,提升Transformer表达能力与速度
Kolmogorov-Arnold Transformer
- 以Kolmogorov-Arnold网络替代传统MLP,增强模型表达力
- 在ImageNet上比标准Transformer高1.8%准确率,推理更快
- 适合追求高性能与高效推理的深度学习研究者
Transformers是现代深度学习的核心。传统模型依赖多层感知机(MLP)在通道间混合信息。本文提出Kolmogorov-Arnold Transformer(KAT),用Kolmogorov-Arnold网络(KAN)替换MLP层,以提升模型表达力和性能。然而,将KAN集成到Transformer中面临三大挑战:(C1)基函数问题:标准B样条函数不适应现代硬件并行计算,导致推理慢;(C2)参数与计算效率低:每个输入-输出对需独立函数,计算量巨大;(C3)权重初始化难:因可学习激活函数,初始化困难影响收敛。为此,提出三项解决方案:(S1)采用有理基函数替代B样条,提升GPU兼容性,通过CUDA实现加速;(S2)引入分组KAN,共享激活权重,降低计算开销而不损失性能;(S3)采用方差保持初始化,确保各层激活方差稳定。实验表明,KAT可有效扩展,在ImageNet上优于标准Transformer达1.8%,且推理速度更快。
原文摘要 · Abstract (English)
Transformers stand as the cornerstone of mordern deep learning. Traditionally, these models rely on multi-layer perceptron (MLP) layers to mix the information between channels. In this paper, we introduce the Kolmogorov-Arnold Transformer (KAT), a novel architecture that replaces MLP layers with Kolmogorov-Arnold Network (KAN) layers to enhance the expressiveness and performance of the model. Integrating KANs into transformers, however, is no easy feat, especially when scaled up. Specifically, we identify three key challenges: (C1) Base function. The standard B-spline function used in KANs is not optimized for parallel computing on modern hardware, resulting in slower inference speeds. (C2) Parameter and Computation Inefficiency. KAN requires a unique function for each input-output pair, making the computation extremely large. (C3) Weight initialization. The initialization of weights in KANs is particularly challenging due to their learnable activation functions, which are critical for achieving convergence in deep neural networks. To overcome the aforementioned challenges, we propose three key solutions: (S1) Rational basis. We replace B-spline functions with rational functions to improve compatibility with modern GPUs. By implementing this in CUDA, we achieve faster computations. (S2) Group KAN. We share the activation weights through a group of neurons, to reduce the computational load without sacrificing performance. (S3) Variance-preserving initialization. We carefully initialize the activation weights to make sure that the activation variance is maintained across layers. With these designs, KAT scales effectively and readily outperforms traditional MLP-based transformers.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。