Skip to main content
QUICK REVIEW

[Paper Review] Kolmogorov-Arnold Transformer

Xingyi Yang, Xinchao Wang|arXiv (Cornell University)|Sep 16, 2024
Fusion and Plasma Physics StudiesPhysics and Astronomy14 citations
TL;DR

This paper replaces MLP layers in vision transformers with Group-Rational Kolmogorov–ArnolD Networks (GR-KAN) to improve expressiveness and efficiency, enabling ImageNet-scale training and outperforming ViT/DeiT baselines.

ABSTRACT

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.

Motivation & Objective

  • Identify scalability challenges of integrating KANs into transformers (base function, parameterization, initialization).
  • Propose solutions: rational activation, group KAN, and variance-preserving initialization.
  • Develop and validate KAT by replacing MLPs with GR-KAN in ViT-like architectures.
  • Demonstrate performance gains across image classification, object detection, and semantic segmentation tasks.

Proposed method

  • Adopt rational functions as base activations in KAN and implement CUDA-based gradients for efficiency.
  • Introduce Group-Rational KAN (GR-KAN) with shared base functions across edge groups to reduce parameters and computation.
  • Apply Horner’s method to polynomial evaluations for faster CUDA execution.
  • Use variance-preserving initialization to stabilize training across GR-KAN layers.
  • Enable weight transfer from pre-trained ViT so KAT can load ViT weights and fine-tune.
  • Evaluate KAT on ImageNet-1K, COCO (Mask R-CNN with ViTDet), and ADE20K (UperNet) to demonstrate scalability and performance gains.

Experimental results

Research questions

  • RQ1Can GR-KAN replace MLPs in vision transformers without sacrificing convergence or performance at ImageNet scale?
  • RQ2Do rational activation functions with group-wise parameter sharing improve computational efficiency and accuracy compared to B-spline KANs?
  • RQ3How does KAT perform on standard vision tasks (classification, detection, segmentation) relative to ViT/DeiT baselines under similar compute?
  • RQ4What is the impact of pre-training transfer from ViT to KAT in terms of final accuracy?
  • RQ5What ablations reveal about activation choices and initialization effects on KAT performance?

Key findings

  • KAT variants consistently outperform MLP-based transformers at similar FLOPs and parameter budgets on ImageNet-1K.
  • KAT-T achieves 74.6% top-1 (ViT-Ti/16 scale) and 75.7% with pre-training transfer, surpassing ViT/DeiT baselines.
  • KAT-S achieves 81.2% top-1 without pre-training and 82.0% with pre-training on ImageNet-1K, outperforming DeiT-S by ~2.4%.
  • KAT-B achieves 82.3% top-1, and 82.8% when initialized from ViT, exceeding ViT-B and DeiT-B baselines.
  • ViT + KAN without the proposed scalability fixes fails to converge on ImageNet-scale training, illustrating the necessity of GR-KAN design (S1-S3).
  • Across detection and segmentation, KAT backbones yield consistent gains over ViTDet and DeiT-like backbones, with smaller models showing larger relative improvements.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.