Introduction
Kolmogorov-Arnold Networks (KANs) have emerged as a compelling alternative to traditional Multi-Layer Perceptrons (MLPs), particularly for scientific AI where interpretability is paramount. However, KANs suffer from a significant "speed tax," often running 10x slower than MLPs of comparable size. This inefficiency stems from complex polynomial basis functions, irregular memory access patterns, and naive implementations that fail to leverage modern GPU architectures.
PolyKAN addresses this bottleneck by introducing a library of highly optimized, fused CUDA kernels. By replacing slow recursive calculations with clever memory optimizations and lookup tables, PolyKAN achieves up to 12x faster training and 10x faster inference, making KANs computationally practical for the first time.
Background: KANs vs. MLPs
The fundamental difference between MLPs and KANs lies in the placement of learnable parameters. While MLPs apply fixed activation functions (like ReLU) to nodes and learn weights on edges, KANs place learnable activation functions directly on the "edges" (connections) between nodes.
As shown in Figure 1, KANs are based on the Kolmogorov-Arnold Representation Theorem, which represents a multivariate continuous function as a finite composition of continuous functions of a single variable and the addition operation. This structure allows for high expressivity but introduces the computational complexity that PolyKAN seeks to solve.
The PolyKAN Optimization Suite
PolyKAN implements four primary optimization techniques to bridge the performance gap:
- Lookup Table (LUT) with Linear Interpolation: Instead of computing expensive trigonometric or recursive functions at runtime, PolyKAN uses pre-calculated tables. This "variant-agnostic" approach supports various polynomials (Chebyshev, Legendre, Fourier) through a unified CUDA logic.
- 2D Tiling: Input and output dimensions are partitioned into rectangular blocks to maximize spatial locality, keeping data within the GPU's high-speed cache.
- Two-Stage Reduction: To mitigate atomic contention during updates, PolyKAN computes partial sums in shared memory before a final merge.
- Coefficient-Layout Reordering: By reordering data from standard layouts to a unit-stride format (
[degree, output_dim, input_dim]), the library ensures faster, coalesced memory reads.
Figure 5 illustrates how these optimizations allow for the replacement of traditional Feed Forward Networks (FFNs) with efficient polynomial expansions across various architectures, including Transformers and CNNs.
Experimental Results
The researchers evaluated PolyKAN across audio classification (Google Speech Commands v2), speech enhancement (VoiceBank-DEMAND), and tabular regression (Kaggle House-Prices).
- Performance: PolyKAN delivered 1.4–12× faster training and 1.2–10× faster inference compared to cuBLAS-optimized baselines.
- Throughput: In audio tasks, PolyKAN reached 82,030 samples/s, nearly 4x the throughput of the cuBLAS baseline (21,029 samples/s).
- Convergence: Surprisingly, the LUT-based approximation improved convergence. The piecewise-constant gradient acts as an implicit regularizer, smoothing the optimization landscape.
Conclusion and Future Work
PolyKAN successfully removes the primary barrier to KAN adoption: computational overhead. While currently focused on polynomial variants, the library's design suggests a path toward integrating KANs into large-scale foundation models. Future research will explore non-polynomial basis functions and the scalability of KANs within massive LLM architectures.
Summary updated